summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlan Mishchenko <alanmi@berkeley.edu>2013-10-16 13:33:51 -0700
committerAlan Mishchenko <alanmi@berkeley.edu>2013-10-16 13:33:51 -0700
commit4ab7905b72f8191c0959b129c4b29b38c2a1956c (patch)
treea887e74f4669b8e66010a557261f166e412f4eac
parentf9900a4c3b69ecae26306f567cd85c9cefebf244 (diff)
downloadabc-4ab7905b72f8191c0959b129c4b29b38c2a1956c.tar.gz
abc-4ab7905b72f8191c0959b129c4b29b38c2a1956c.tar.bz2
abc-4ab7905b72f8191c0959b129c4b29b38c2a1956c.zip
Fix for writing choices into a BLIF file.
-rw-r--r--src/base/abc/abcNetlist.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/base/abc/abcNetlist.c b/src/base/abc/abcNetlist.c
index 91eb73ee..0147db58 100644
--- a/src/base/abc/abcNetlist.c
+++ b/src/base/abc/abcNetlist.c
@@ -242,10 +242,12 @@ Abc_Ntk_t * Abc_NtkLogicToNetlist( Abc_Ntk_t * pNtk )
***********************************************************************/
Abc_Ntk_t * Abc_NtkAigToLogicSop( Abc_Ntk_t * pNtk )
{
+ extern int Abc_NtkLogicMakeSimpleCos2( Abc_Ntk_t * pNtk, int fDuplicate );
+
Abc_Ntk_t * pNtkNew;
Abc_Obj_t * pObj, * pFanin, * pNodeNew;
Vec_Int_t * vInts;
- int i, k;
+ int i, k, fChoices = 0;
assert( Abc_NtkIsStrash(pNtk) );
// start the network
pNtkNew = Abc_NtkStartFrom( pNtk, ABC_NTK_LOGIC, ABC_FUNC_SOP );
@@ -278,6 +280,7 @@ Abc_Ntk_t * Abc_NtkAigToLogicSop( Abc_Ntk_t * pNtk )
// set the new node
pObj->pCopy->pCopy = pNodeNew;
Vec_IntFree( vInts );
+ fChoices = 1;
}
// connect the internal nodes
Abc_NtkForEachNode( pNtk, pObj, i )
@@ -299,7 +302,10 @@ Abc_Ntk_t * Abc_NtkAigToLogicSop( Abc_Ntk_t * pNtk )
}
// fix the problem with complemented and duplicated CO edges
- Abc_NtkLogicMakeSimpleCos( pNtkNew, 0 );
+ if ( fChoices )
+ Abc_NtkLogicMakeSimpleCos2( pNtkNew, 0 );
+ else
+ Abc_NtkLogicMakeSimpleCos( pNtkNew, 0 );
// duplicate the EXDC Ntk
if ( pNtk->pExdc )
{