mirror of https://github.com/YosysHQ/abc.git
Merge pull request #423 from MyskYko/fix2
fix a bug when yosys constants are already declared
This commit is contained in:
commit
da52efecdc
|
|
@ -1565,19 +1565,19 @@ void Abc_NtkFixNonDrivenNets( Abc_Ntk_t * pNtk )
|
||||||
|
|
||||||
// special case
|
// special case
|
||||||
pNet = Abc_NtkFindNet( pNtk, "$false" );
|
pNet = Abc_NtkFindNet( pNtk, "$false" );
|
||||||
if ( pNet != NULL )
|
if ( pNet != NULL && !Abc_ObjFaninNum(pNet) )
|
||||||
{
|
{
|
||||||
pNode = Abc_NtkCreateNodeConst0( pNtk );
|
pNode = Abc_NtkCreateNodeConst0( pNtk );
|
||||||
Abc_ObjAddFanin( pNet, pNode );
|
Abc_ObjAddFanin( pNet, pNode );
|
||||||
}
|
}
|
||||||
pNet = Abc_NtkFindNet( pNtk, "$undef" );
|
pNet = Abc_NtkFindNet( pNtk, "$undef" );
|
||||||
if ( pNet != NULL )
|
if ( pNet != NULL && !Abc_ObjFaninNum(pNet) )
|
||||||
{
|
{
|
||||||
pNode = Abc_NtkCreateNodeConst0( pNtk );
|
pNode = Abc_NtkCreateNodeConst0( pNtk );
|
||||||
Abc_ObjAddFanin( pNet, pNode );
|
Abc_ObjAddFanin( pNet, pNode );
|
||||||
}
|
}
|
||||||
pNet = Abc_NtkFindNet( pNtk, "$true" );
|
pNet = Abc_NtkFindNet( pNtk, "$true" );
|
||||||
if ( pNet != NULL )
|
if ( pNet != NULL && !Abc_ObjFaninNum(pNet) )
|
||||||
{
|
{
|
||||||
pNode = Abc_NtkCreateNodeConst1( pNtk );
|
pNode = Abc_NtkCreateNodeConst1( pNtk );
|
||||||
Abc_ObjAddFanin( pNet, pNode );
|
Abc_ObjAddFanin( pNet, pNode );
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue