diff options
author | Alan Mishchenko <alanmi@berkeley.edu> | 2009-04-24 08:01:00 -0700 |
---|---|---|
committer | Alan Mishchenko <alanmi@berkeley.edu> | 2009-04-24 08:01:00 -0700 |
commit | d7a048d738381651b53340684e26f06b78b8a78c (patch) | |
tree | 82f7bea9d0750a388494e6fffceb61cfeff969b7 /src/aig/ntl/ntlInsert.c | |
parent | 77fab468ad32d15de5c065c211f6f74371670940 (diff) | |
download | abc-d7a048d738381651b53340684e26f06b78b8a78c.tar.gz abc-d7a048d738381651b53340684e26f06b78b8a78c.tar.bz2 abc-d7a048d738381651b53340684e26f06b78b8a78c.zip |
Version abc90424
Diffstat (limited to 'src/aig/ntl/ntlInsert.c')
-rw-r--r-- | src/aig/ntl/ntlInsert.c | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/src/aig/ntl/ntlInsert.c b/src/aig/ntl/ntlInsert.c index 21f2d246..eb967bdc 100644 --- a/src/aig/ntl/ntlInsert.c +++ b/src/aig/ntl/ntlInsert.c @@ -245,6 +245,42 @@ Ntl_Man_t * Ntl_ManInsertAig( Ntl_Man_t * p, Aig_Man_t * pAig ) /**Function************************************************************* + Synopsis [Find drivers of the given net.] + + Description [] + + SideEffects [] + + SeeAlso [] + +***********************************************************************/ +void Ntl_ManFindDriver( Ntl_Man_t * p, char * pName ) +{ + Ntl_Mod_t * pRoot; + Ntl_Obj_t * pNode; + Ntl_Net_t * pNet, * pNetThis; + int i, k; + pRoot = Ntl_ManRootModel( p ); + pNetThis = Ntl_ModelFindNet( pRoot, pName ); + printf( "\n*** Net %d \"%s\":\n", pNetThis->NetId, pName ); + // mark from the nodes + Ntl_ModelForEachPo( pRoot, pNode, i ) + if ( pNetThis == Ntl_ObjFanin0(pNode) ) + printf( "driven by PO %d\n", i ); + Ntl_ModelForEachNode( pRoot, pNode, i ) + Ntl_ObjForEachFanin( pNode, pNet, k ) + if ( pNetThis == pNet ) + printf( "driven by node %d with %d fanins and %d fanouts\n (%s)\n", + pNode->Id, Ntl_ObjFaninNum(pNode), Ntl_ObjFanoutNum(pNode), Ntl_ObjFanout(pNode,0)->pName ); + Ntl_ModelForEachBox( pRoot, pNode, i ) + Ntl_ObjForEachFanin( pNode, pNet, k ) + if ( pNetThis == pNet ) + printf( "driven by box %d with %d fanins and %d fanouts\n (%s)\n", + pNode->Id, Ntl_ObjFaninNum(pNode), Ntl_ObjFanoutNum(pNode), Ntl_ObjFanout(pNode,0)->pName ); +} + +/**Function************************************************************* + Synopsis [Inserts the given mapping into the netlist.] Description [] |