diff options
author | Alan Mishchenko <alanmi@berkeley.edu> | 2013-05-25 18:10:45 -0700 |
---|---|---|
committer | Alan Mishchenko <alanmi@berkeley.edu> | 2013-05-25 18:10:45 -0700 |
commit | 94a75fe6d8f8709603dbf9e5bf959174dc3342ac (patch) | |
tree | a74f1e34183c94b4a2a93d83f821f8134d5c9951 /src/base/abci | |
parent | f47cc6cefccb859b0b64eb89648c5126b8ccbf22 (diff) | |
download | abc-94a75fe6d8f8709603dbf9e5bf959174dc3342ac.tar.gz abc-94a75fe6d8f8709603dbf9e5bf959174dc3342ac.tar.bz2 abc-94a75fe6d8f8709603dbf9e5bf959174dc3342ac.zip |
New MFS package.
Diffstat (limited to 'src/base/abci')
-rw-r--r-- | src/base/abci/abc.c | 4 | ||||
-rw-r--r-- | src/base/abci/abcMfs.c | 11 |
2 files changed, 12 insertions, 3 deletions
diff --git a/src/base/abci/abc.c b/src/base/abci/abc.c index 5f100fb0..cb3e1f1e 100644 --- a/src/base/abci/abc.c +++ b/src/base/abci/abc.c @@ -4327,7 +4327,7 @@ int Abc_CommandMfs( Abc_Frame_t * pAbc, int argc, char ** argv ) } pPars->nFanoutsMax = atoi(argv[globalUtilOptind]); globalUtilOptind++; - if ( pPars->nFanoutsMax < 1 ) + if ( pPars->nFanoutsMax < 0 ) goto usage; break; case 'D': @@ -4496,7 +4496,7 @@ int Abc_CommandMfs2( Abc_Frame_t * pAbc, int argc, char ** argv ) } pPars->nFanoutMax = atoi(argv[globalUtilOptind]); globalUtilOptind++; - if ( pPars->nFanoutMax < 1 ) + if ( pPars->nFanoutMax < 0 ) goto usage; break; case 'D': diff --git a/src/base/abci/abcMfs.c b/src/base/abci/abcMfs.c index 9c0513de..7953be15 100644 --- a/src/base/abci/abcMfs.c +++ b/src/base/abci/abcMfs.c @@ -19,6 +19,7 @@ ***********************************************************************/ #include "base/abc/abc.h" +#include "bool/kit/kit.h" #include "opt/sfm/sfm.h" ABC_NAMESPACE_IMPL_START @@ -120,6 +121,7 @@ Sfm_Ntk_t * Abc_NtkExtractMfs( Abc_Ntk_t * pNtk ) ***********************************************************************/ void Abc_NtkInsertMfs( Abc_Ntk_t * pNtk, Sfm_Ntk_t * p ) { + Vec_Int_t * vCover = Sfm_NodeReadCover(p); Vec_Int_t * vMap, * vArray; Abc_Obj_t * pNode; int i, k, Fanin; @@ -155,7 +157,14 @@ void Abc_NtkInsertMfs( Abc_Ntk_t * pNtk, Sfm_Ntk_t * p ) else if ( ~pTruth[0] == 0 ) pNode->pData = Abc_SopRegister( (Mem_Flex_t *)pNtk->pManFunc, " 1\n" ); else - pNode->pData = Abc_SopCreateFromTruth( (Mem_Flex_t *)pNtk->pManFunc, Vec_IntSize(vArray), (unsigned *)pTruth ); + { +// pNode->pData = Abc_SopCreateFromTruth( (Mem_Flex_t *)pNtk->pManFunc, Vec_IntSize(vArray), (unsigned *)pTruth ); + int RetValue = Kit_TruthIsop( (unsigned *)pTruth, Vec_IntSize(vArray), vCover, 1 ); + assert( RetValue == 0 || RetValue == 1 ); + pNode->pData = Abc_SopCreateFromIsop( (Mem_Flex_t *)pNtk->pManFunc, Vec_IntSize(vArray), vCover ); + if ( RetValue ) + Abc_SopComplement( (char *)pNode->pData ); + } } Vec_IntFree( vMap ); } |