summaryrefslogtreecommitdiffstats
path: root/src/base
diff options
context:
space:
mode:
authorAlan Mishchenko <alanmi@berkeley.edu>2018-09-29 08:26:48 -0700
committerAlan Mishchenko <alanmi@berkeley.edu>2018-09-29 08:26:48 -0700
commita8faa2b55ced8321944ad9ed3c9e5204a4ab4d9c (patch)
treefd732c2c1212d6cce0c49f1fc5886a74ef01173a /src/base
parent75ed8581dd9b22312c9ed0fd2d24d963ab4ff4ed (diff)
downloadabc-a8faa2b55ced8321944ad9ed3c9e5204a4ab4d9c.tar.gz
abc-a8faa2b55ced8321944ad9ed3c9e5204a4ab4d9c.tar.bz2
abc-a8faa2b55ced8321944ad9ed3c9e5204a4ab4d9c.zip
Adding switch to 'write_pla' to write random onset minterms of the first PO function (bug fix).
Diffstat (limited to 'src/base')
-rw-r--r--src/base/io/ioWritePla.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/base/io/ioWritePla.c b/src/base/io/ioWritePla.c
index d9d3f76c..8aa9ee19 100644
--- a/src/base/io/ioWritePla.c
+++ b/src/base/io/ioWritePla.c
@@ -523,8 +523,14 @@ int Io_WriteMoPlaOneM( FILE * pFile, Abc_Ntk_t * pNtk, int nMints )
Abc_NtkForEachCo( pNtk, pObj, i )
Vec_PtrPush( vFuncsGlob, Abc_ObjGlobalBdd(pObj) );
- // consider minterms
- Io_WriteMoPlaOneIntMintermsM( pFile, pNtk, dd, (DdNode *)Vec_PtrEntry(vFuncsGlob, 0), nMints );
+ // get the output function
+ bFunc = (DdNode *)Vec_PtrEntry(vFuncsGlob, 0);
+ if ( bFunc == Cudd_ReadOne(dd) )
+ printf( "First primary output has constant 1 function.\n" );
+ else if ( Cudd_Not(bFunc) == Cudd_ReadOne(dd) )
+ printf( "First primary output has constant 0 function.\n" );
+ else
+ Io_WriteMoPlaOneIntMintermsM( pFile, pNtk, dd, bFunc, nMints );
Abc_NtkFreeGlobalBdds( pNtk, 0 );
// cleanup