Package: berkeley-abc Version: 1.01+20140822hg4d547a5+dfsg severity: minor Tags: patch
abc fails an assert when the network is too shallow(due to constants). I've submitted an issue upstream before, but nothing happened. It has a testcase: <https://bitbucket.org/alanmi/abc/issue/27/assertion-failure-in-write_pla-command> It is trivial to fix, but I don't know if it outputs correct pla files in /all/ cases. (It seems to work ok as input to GAL fusemappers and stuff like that) Please apply.
Description: soften an overzealous assert otherwise the abc will refuse to output trivial functions(constant 1 or 0). --- berkeley-abc-1.01+20140822hg4d547a5+dfsg.orig/src/base/io/ioWritePla.c +++ berkeley-abc-1.01+20140822hg4d547a5+dfsg/src/base/io/ioWritePla.c @@ -50,7 +50,7 @@ int Io_WritePla( Abc_Ntk_t * pNtk, char FILE * pFile; assert( Abc_NtkIsSopNetlist(pNtk) ); - assert( Abc_NtkLevel(pNtk) == 1 ); + assert( Abc_NtkLevel(pNtk) <= 1 ); pFile = fopen( pFileName, "w" ); if ( pFile == NULL )