summaryrefslogtreecommitdiffstats
path: root/src/base
diff options
context:
space:
mode:
Diffstat (limited to 'src/base')
-rw-r--r--src/base/abci/abc.c4
-rw-r--r--src/base/abci/abcMfs.c11
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 );
}