Merge pull request #423 from MyskYko/fix2

fix a bug when yosys constants are already declared
This commit is contained in:
alanminko 2025-06-17 21:19:55 -07:00 committed by GitHub
commit da52efecdc
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 3 deletions

View File

@ -1565,19 +1565,19 @@ void Abc_NtkFixNonDrivenNets( Abc_Ntk_t * pNtk )
// special case
pNet = Abc_NtkFindNet( pNtk, "$false" );
if ( pNet != NULL )
if ( pNet != NULL && !Abc_ObjFaninNum(pNet) )
{
pNode = Abc_NtkCreateNodeConst0( pNtk );
Abc_ObjAddFanin( pNet, pNode );
}
pNet = Abc_NtkFindNet( pNtk, "$undef" );
if ( pNet != NULL )
if ( pNet != NULL && !Abc_ObjFaninNum(pNet) )
{
pNode = Abc_NtkCreateNodeConst0( pNtk );
Abc_ObjAddFanin( pNet, pNode );
}
pNet = Abc_NtkFindNet( pNtk, "$true" );
if ( pNet != NULL )
if ( pNet != NULL && !Abc_ObjFaninNum(pNet) )
{
pNode = Abc_NtkCreateNodeConst1( pNtk );
Abc_ObjAddFanin( pNet, pNode );