summaryrefslogtreecommitdiffstats
path: root/src/base/abci/abcStrash.c
diff options
context:
space:
mode:
authorAlan Mishchenko <alanmi@berkeley.edu>2006-09-20 08:01:00 -0700
committerAlan Mishchenko <alanmi@berkeley.edu>2006-09-20 08:01:00 -0700
commit0da555cb481696efd78d9c5dc6293b6a95d1ffd5 (patch)
treebac6826fd2c8650225f237ca524b8b0276c9c224 /src/base/abci/abcStrash.c
parent370578bf1c4504b65f49ab63fcf7ed9c88a15d69 (diff)
downloadabc-0da555cb481696efd78d9c5dc6293b6a95d1ffd5.tar.gz
abc-0da555cb481696efd78d9c5dc6293b6a95d1ffd5.tar.bz2
abc-0da555cb481696efd78d9c5dc6293b6a95d1ffd5.zip
Version abc60920
Diffstat (limited to 'src/base/abci/abcStrash.c')
-rw-r--r--src/base/abci/abcStrash.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/base/abci/abcStrash.c b/src/base/abci/abcStrash.c
index a130c11f..e8dc9793 100644
--- a/src/base/abci/abcStrash.c
+++ b/src/base/abci/abcStrash.c
@@ -135,9 +135,8 @@ Abc_Ntk_t * Abc_NtkStrash( Abc_Ntk_t * pNtk, bool fAllNodes, bool fCleanup )
Synopsis [Appends the second network to the first.]
Description [Modifies the first network by adding the logic of the second.
- Performs structural hashing while appending the networks. Does not add
- the COs of the second. Does not change the second network. Returns 0
- if the appending failed, 1 otherise.]
+ Performs structural hashing while appending the networks. Does not change
+ the second network. Returns 0 if the appending failed, 1 otherise.]
SideEffects []
@@ -159,11 +158,15 @@ int Abc_NtkAppend( Abc_Ntk_t * pNtk1, Abc_Ntk_t * pNtk2, int fAddPos )
// check that the networks have the same PIs
// reorder PIs of pNtk2 according to pNtk1
if ( !Abc_NtkCompareSignals( pNtk1, pNtk2, 1, 1 ) )
- return 0;
+ printf( "Abc_NtkAppend(): The union of the network PIs is computed (warning).\n" );
// perform strashing
Abc_NtkCleanCopy( pNtk2 );
Abc_NtkForEachCi( pNtk2, pObj, i )
- pObj->pCopy = Abc_NtkCi(pNtk1, i);
+ {
+ pObj->pCopy = Abc_NtkFindCi(pNtk1, Abc_ObjName(pObj));
+ if ( pObj->pCopy == NULL )
+ pObj->pCopy = Abc_NtkDupObj(pNtk1, pObj, 1);
+ }
// add pNtk2 to pNtk1 while strashing
if ( Abc_NtkIsLogic(pNtk2) )
Abc_NtkStrashPerform( pNtk2, pNtk1, 1 );