summaryrefslogtreecommitdiffstats
path: root/src/aig/ntl/ntlInsert.c
diff options
context:
space:
mode:
authorAlan Mishchenko <alanmi@berkeley.edu>2008-05-07 08:01:00 -0700
committerAlan Mishchenko <alanmi@berkeley.edu>2008-05-07 08:01:00 -0700
commit6175fcb8026bae3db5b4280b655131322d7944da (patch)
tree41889f98814c981dcadcc5ce0f1990b74981cd49 /src/aig/ntl/ntlInsert.c
parent436d5d2103b2cfec6a6deb5bbba72ce8e820f785 (diff)
downloadabc-6175fcb8026bae3db5b4280b655131322d7944da.tar.gz
abc-6175fcb8026bae3db5b4280b655131322d7944da.tar.bz2
abc-6175fcb8026bae3db5b4280b655131322d7944da.zip
Version abc80507
Diffstat (limited to 'src/aig/ntl/ntlInsert.c')
-rw-r--r--src/aig/ntl/ntlInsert.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/aig/ntl/ntlInsert.c b/src/aig/ntl/ntlInsert.c
index 3e9f82d6..3cd9470b 100644
--- a/src/aig/ntl/ntlInsert.c
+++ b/src/aig/ntl/ntlInsert.c
@@ -82,6 +82,8 @@ Ntl_Man_t * Ntl_ManInsertMapping( Ntl_Man_t * p, Vec_Ptr_t * vMapping, Aig_Man_t
Ntl_ObjSetFanin( pNode, pNet, k );
}
}
+ else
+ pNode->nFanins = 0;
sprintf( Buffer, "lut%0*d", nDigits, i );
if ( (pNet = Ntl_ModelFindNet( pRoot, Buffer )) )
{
@@ -302,6 +304,8 @@ Ntl_Man_t * Ntl_ManInsertNtk( Ntl_Man_t * p, Nwk_Man_t * pNtk )
Ntl_ObjSetFanin( pNode, pNet, k );
}
}
+ else
+ pNode->nFanins = 0;
sprintf( Buffer, "lut%0*d", nDigits, i );
if ( (pNet = Ntl_ModelFindNet( pRoot, Buffer )) )
{
@@ -341,13 +345,16 @@ Ntl_Man_t * Ntl_ManInsertNtk( Ntl_Man_t * p, Nwk_Man_t * pNtk )
if ( !Ntl_ModelSetNetDriver( pNode, pNetCo ) )
{
printf( "Ntl_ManInsertNtk(): Internal error: PO net has more than one fanin.\n" );
- return 0;
+ return NULL;
}
}
// clean CI/CO marks
Ntl_ManUnmarkCiCoNets( p );
if ( !Ntl_ManCheck( p ) )
+ {
printf( "Ntl_ManInsertNtk: The check has failed for design %s.\n", p->pName );
+ return NULL;
+ }
return p;
}