summaryrefslogtreecommitdiffstats
path: root/src/aig/gia
diff options
context:
space:
mode:
Diffstat (limited to 'src/aig/gia')
-rw-r--r--src/aig/gia/gia.h9
-rw-r--r--src/aig/gia/giaAbsGla2.c32
2 files changed, 25 insertions, 16 deletions
diff --git a/src/aig/gia/gia.h b/src/aig/gia/gia.h
index 3a22f8f4..2cd47d62 100644
--- a/src/aig/gia/gia.h
+++ b/src/aig/gia/gia.h
@@ -226,13 +226,14 @@ struct Gia_ParVta_t_
int fUseRollback; // use rollback to the starting number of frames
int fPropFanout; // propagate fanout implications
int fAddLayer; // refinement strategy by adding layers
- int fUseSkip;
- int fUseSimple;
- int fSkipHash;
+ int fUseSkip; // skip proving intermediate timeframes
+ int fUseSimple; // use simple CNF construction
+ int fSkipHash; // skip hashing CNF while unrolling
int fDumpVabs; // dumps the abstracted model
+ int fDumpMabs; // dumps the original AIG with abstraction map
char * pFileVabs; // dumps the abstracted model into this file
int fVerbose; // verbose flag
- int fVeryVerbose;
+ int fVeryVerbose; // print additional information
int iFrame; // the number of frames covered
int nFramesNoChange; // the number of last frames without changes
};
diff --git a/src/aig/gia/giaAbsGla2.c b/src/aig/gia/giaAbsGla2.c
index 5e1873f0..2c628ea8 100644
--- a/src/aig/gia/giaAbsGla2.c
+++ b/src/aig/gia/giaAbsGla2.c
@@ -1325,18 +1325,26 @@ void Ga2_GlaDumpAbsracted( Ga2_Man_t * p, int fVerbose )
{
char * pFileNameDef = "glabs.aig";
char * pFileName = p->pPars->pFileVabs ? p->pPars->pFileVabs : pFileNameDef;
- Gia_Man_t * pAbs;
- Vec_Int_t * vGateClasses;
if ( fVerbose )
Abc_Print( 1, "Dumping abstracted model into file \"%s\"...\n", pFileName );
- // create abstraction
- vGateClasses = Ga2_ManAbsTranslate( p );
- pAbs = Gia_ManDupAbsGates( p->pGia, vGateClasses );
- Vec_IntFreeP( &vGateClasses );
- Gia_ManCleanValue( p->pGia );
- // write into file
- Gia_WriteAiger( pAbs, pFileName, 0, 0 );
- Gia_ManStop( pAbs );
+ if ( p->pPars->fDumpVabs )
+ {
+ // dump absracted model
+ Vec_Int_t * vGateClasses = Ga2_ManAbsTranslate( p );
+ Gia_Man_t * pAbs = Gia_ManDupAbsGates( p->pGia, vGateClasses );
+ Gia_ManCleanValue( p->pGia );
+ Gia_WriteAiger( pAbs, pFileName, 0, 0 );
+ Gia_ManStop( pAbs );
+ Vec_IntFreeP( &vGateClasses );
+ }
+ else if ( p->pPars->fDumpMabs )
+ {
+ // dump abstraction map
+ Vec_IntFreeP( &p->pGia->vGateClasses );
+ p->pGia->vGateClasses = Ga2_ManAbsTranslate( p );
+ Gia_WriteAiger( p->pGia, pFileName, 0, 0 );
+ }
+ else assert( 0 );
}
/**Function*************************************************************
@@ -1426,7 +1434,7 @@ int Ga2_ManPerform( Gia_Man_t * pAig, Gia_ParVta_t * pPars )
Abc_Print( 1, "FrameMax = %d ConfMax = %d Timeout = %d RatioMin = %d %% RatioMax = %d %%\n",
pPars->nFramesMax, pPars->nConfLimit, pPars->nTimeOut, pPars->nRatioMin, pPars->nRatioMax );
Abc_Print( 1, "LrnStart = %d LrnDelta = %d LrnRatio = %d %% Skip = %d SimpleCNF = %d Dump = %d\n",
- pPars->nLearnedStart, pPars->nLearnedDelta, pPars->nLearnedPerce, pPars->fUseSkip, pPars->fUseSimple, pPars->fDumpVabs );
+ pPars->nLearnedStart, pPars->nLearnedDelta, pPars->nLearnedPerce, pPars->fUseSkip, pPars->fUseSimple, pPars->fDumpVabs|pPars->fDumpMabs );
Abc_Print( 1, " Frame %% Abs PPI FF LUT Confl Cex Vars Clas Lrns Time Mem\n" );
}
// iterate unrolling
@@ -1620,7 +1628,7 @@ int Ga2_ManPerform( Gia_Man_t * pAig, Gia_ParVta_t * pPars )
}
// dump the model into file
- if ( p->pPars->fDumpVabs )
+ if ( p->pPars->fDumpVabs || p->pPars->fDumpMabs )
{
Abc_FrameSetCex( NULL );
Abc_FrameSetNFrames( f+1 );