Bug fix in hierarchical BLIF reader.

This commit is contained in:
Alan Mishchenko 2012-10-11 23:25:40 -07:00
parent 0294fc7861
commit 7235d74010
1 changed files with 2 additions and 3 deletions

View File

@ -1272,7 +1272,7 @@ static int Io_MvParseLineSubckt( Io_MvMod_t * p, char * pLine )
return 0;
}
*/
if ( k == nEquals )
if ( pName2 == NULL )
{
Abc_Obj_t * pNode = Abc_NtkCreateNode( p->pNtk );
pNode->pData = Abc_SopRegister( (Mem_Flex_t *)p->pNtk->pManFunc, " 0\n" );
@ -1313,11 +1313,10 @@ static int Io_MvParseLineSubckt( Io_MvMod_t * p, char * pLine )
return 0;
}
*/
assert( pName2 != NULL );
// create the BI with the actual name
pTerm = Abc_NtkCreateBo( p->pNtk );
pNet = Abc_NtkFindOrCreateNet( p->pNtk, k == nEquals ? Abc_ObjNameSuffix(pTerm, "abc") : pName2 );
pNet = Abc_NtkFindOrCreateNet( p->pNtk, pName2 == NULL ? Abc_ObjNameSuffix(pTerm, "abc") : pName2 );
Abc_ObjAddFanin( pNet, pTerm );
Abc_ObjAddFanin( pTerm, pBox );
}