diff options
author | Alan Mishchenko <alanmi@berkeley.edu> | 2011-11-12 13:30:28 -0800 |
---|---|---|
committer | Alan Mishchenko <alanmi@berkeley.edu> | 2011-11-12 13:30:28 -0800 |
commit | c16f5d6494982ccbbdaa5226e869ffafef0b9530 (patch) | |
tree | 512df34a2683611c19bceeb5fe100ce8a2aea931 /src/aig/gia/giaDup.c | |
parent | 3beb36778ec35702690833e6a5d01498d1113b28 (diff) | |
download | abc-c16f5d6494982ccbbdaa5226e869ffafef0b9530.tar.gz abc-c16f5d6494982ccbbdaa5226e869ffafef0b9530.tar.bz2 abc-c16f5d6494982ccbbdaa5226e869ffafef0b9530.zip |
Bug fix in GLA PBA.
Diffstat (limited to 'src/aig/gia/giaDup.c')
-rw-r--r-- | src/aig/gia/giaDup.c | 22 |
1 files changed, 17 insertions, 5 deletions
diff --git a/src/aig/gia/giaDup.c b/src/aig/gia/giaDup.c index 1faa13cd..f1508375 100644 --- a/src/aig/gia/giaDup.c +++ b/src/aig/gia/giaDup.c @@ -1619,7 +1619,7 @@ Gia_Man_t * Gia_ManDupAbsGates( Gia_Man_t * p, Vec_Int_t * vGateClasses ) { Vec_Int_t * vAssigned, * vPis, * vPPis, * vFlops, * vNodes; Gia_Man_t * pNew, * pTemp; - Gia_Obj_t * pObj; + Gia_Obj_t * pObj, * pCopy; int i, nFlops = 0; assert( Gia_ManPoNum(p) == 1 ); assert( Vec_IntSize(vGateClasses) == Gia_ManObjNum(p) ); @@ -1672,11 +1672,23 @@ Gia_Man_t * Gia_ManDupAbsGates( Gia_Man_t * p, Vec_Int_t * vGateClasses ) Gia_ObjRoToRi(p, pObj)->Value = Gia_ManAppendCo( pNew, Gia_ObjFanin0Copy(Gia_ObjRoToRi(p, pObj)) ); Gia_ManSetRegNum( pNew, Vec_IntSize(vFlops) ); // clean up -// pNew = Gia_ManSeqCleanup( pTemp = pNew ); - pNew = Gia_ManCleanup( pTemp = pNew ); + pNew = Gia_ManSeqCleanup( pTemp = pNew ); + // transfer copy values: (p -> pTemp -> pNew) => (p -> pNew) if ( Gia_ManObjNum(pTemp) != Gia_ManObjNum(pNew) ) - printf( "Gia_ManDupAbsGates() Internal error: object mismatch.\n" ); - assert( Gia_ManObjNum(pTemp) == Gia_ManObjNum(pNew) ); + { +// printf( "Gia_ManDupAbsGates() Internal error: object mismatch.\n" ); + Gia_ManForEachObj( p, pObj, i ) + { + if ( !~pObj->Value ) + continue; + assert( !Gia_LitIsCompl(pObj->Value) ); + pCopy = Gia_ObjCopy( pTemp, pObj ); + if ( !~pCopy->Value ) + continue; + assert( !Gia_LitIsCompl(pCopy->Value) ); + pObj->Value = pCopy->Value; + } + } Gia_ManStop( pTemp ); Vec_IntFree( vPis ); |