diff options
Diffstat (limited to 'src/base/abci')
-rw-r--r-- | src/base/abci/abc.c | 1 | ||||
-rw-r--r-- | src/base/abci/abcDar.c | 29 |
2 files changed, 29 insertions, 1 deletions
diff --git a/src/base/abci/abc.c b/src/base/abci/abc.c index a6a77571..45198165 100644 --- a/src/base/abci/abc.c +++ b/src/base/abci/abc.c @@ -9883,7 +9883,6 @@ usage: ***********************************************************************/ int Abc_CommandExpand( Abc_Frame_t * pAbc, int argc, char ** argv ) { - extern Gia_Man_t * Abc_NtkClpGia( Abc_Ntk_t * pNtk ); extern void Abc_NtkExpandCubes( Abc_Ntk_t * pNtk, Gia_Man_t * pGia, int fVerbose ); Abc_Ntk_t * pStrash, * pNtk2, * pNtk = Abc_FrameReadNtk(pAbc); Gia_Man_t * pGia; int c, fVerbose = 0; diff --git a/src/base/abci/abcDar.c b/src/base/abci/abcDar.c index 996ae6a2..8ec810f5 100644 --- a/src/base/abci/abcDar.c +++ b/src/base/abci/abcDar.c @@ -3773,6 +3773,35 @@ Abc_Ntk_t * Abc_NtkInterOne( Abc_Ntk_t * pNtkOn, Abc_Ntk_t * pNtkOff, int fRelat Aig_ManStop( pManAig ); return pNtkAig; } +Gia_Man_t * Gia_ManInterOne( Gia_Man_t * pNtkOn, Gia_Man_t * pNtkOff, int fVerbose ) +{ + extern Aig_Man_t * Aig_ManInter( Aig_Man_t * pManOn, Aig_Man_t * pManOff, int fRelation, int fVerbose ); + Gia_Man_t * pNtkAig; + Aig_Man_t * pManOn, * pManOff, * pManAig; + assert( Gia_ManCiNum(pNtkOn) == Gia_ManCiNum(pNtkOff) ); + assert( Gia_ManCoNum(pNtkOn) == 1 ); + assert( Gia_ManCoNum(pNtkOff) == 1 ); + // create internal AIGs + pManOn = Gia_ManToAigSimple( pNtkOn ); + if ( pManOn == NULL ) + return NULL; + pManOff = Gia_ManToAigSimple( pNtkOff ); + if ( pManOff == NULL ) + return NULL; + // derive the interpolant + pManAig = Aig_ManInter( pManOn, pManOff, 0, fVerbose ); + if ( pManAig == NULL ) + { + Abc_Print( 1, "Interpolant computation failed.\n" ); + return NULL; + } + Aig_ManStop( pManOn ); + Aig_ManStop( pManOff ); + // create logic network + pNtkAig = Gia_ManFromAigSimple( pManAig ); + Aig_ManStop( pManAig ); + return pNtkAig; +} /**Function************************************************************* |