diff options
author | Alan Mishchenko <alanmi@berkeley.edu> | 2014-06-15 22:58:25 -0700 |
---|---|---|
committer | Alan Mishchenko <alanmi@berkeley.edu> | 2014-06-15 22:58:25 -0700 |
commit | 2340d279bd7f1d53f12a2e5b0913d30d9aa98220 (patch) | |
tree | 709fb4ce7d7713336e0f1a83db8567db45ed3506 /src/base | |
parent | 3d3384865996b7ff1453c7e41949dc56dab0a7e0 (diff) | |
download | abc-2340d279bd7f1d53f12a2e5b0913d30d9aa98220.tar.gz abc-2340d279bd7f1d53f12a2e5b0913d30d9aa98220.tar.bz2 abc-2340d279bd7f1d53f12a2e5b0913d30d9aa98220.zip |
Adding support of multi-output problems in &splitprove.
Diffstat (limited to 'src/base')
-rw-r--r-- | src/base/abci/abc.c | 26 |
1 files changed, 25 insertions, 1 deletions
diff --git a/src/base/abci/abc.c b/src/base/abci/abc.c index 5bb79eef..9bd645e6 100644 --- a/src/base/abci/abc.c +++ b/src/base/abci/abc.c @@ -23072,9 +23072,33 @@ int Abc_CommandUnfold( Abc_Frame_t * pAbc, int argc, char ** argv ) Abc_Print( -1, "Empty network.\n" ); return 1; } + if ( Abc_NtkIsComb(pNtk) && Abc_NtkPoNum(pNtk) > 1 ) + { + Abc_Print( -1, "Combinational miter has more than one PO.\n" ); + return 0; + } if ( Abc_NtkIsComb(pNtk) ) { - Abc_Print( -1, "The network is combinational.\n" ); + extern Gia_Man_t * Gia_ManDupWithConstr( Gia_Man_t * p ); + Gia_Man_t * pNew; + Aig_Man_t * pAig = Abc_NtkToDar( pNtk, 0, 0 ); + Gia_Man_t * pGia = Gia_ManFromAigSimple( pAig ); + Aig_ManStop( pAig ); + pNew = Gia_ManDupWithConstr( pGia ); + if ( pNew == NULL ) + { + Abc_Print( -1, "Cannot extract constrains from the miter.\n" ); + return 0; + } + Gia_ManStop( pGia ); + pAig = Gia_ManToAigSimple( pNew ); + Gia_ManStop( pNew ); + pNtkRes = Abc_NtkFromAigPhase( pAig ); + Aig_ManStop( pAig ); + ABC_FREE( pNtkRes->pName ); + pNtkRes->pName = Extra_UtilStrsav( pNtk->pName ); + // replace the current network + Abc_FrameReplaceCurrentNetwork( pAbc, pNtkRes ); return 0; } if ( !Abc_NtkIsStrash(pNtk) ) |