summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/aig/gia/giaDup.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/aig/gia/giaDup.c b/src/aig/gia/giaDup.c
index 923fbbad..a485b147 100644
--- a/src/aig/gia/giaDup.c
+++ b/src/aig/gia/giaDup.c
@@ -2824,16 +2824,21 @@ Gia_Man_t * Gia_ManDupAndOr( Gia_Man_t * p, int nOuts, int fUseOr, int fCompl )
SeeAlso []
***********************************************************************/
-Vec_Ptr_t * Gia_ManMiterNames( Vec_Ptr_t * p )
+Vec_Ptr_t * Gia_ManMiterNames( Vec_Ptr_t * p, int nOuts )
{
char * pName1, * pName2, pBuffer[1000]; int i;
- Vec_Ptr_t * pNew = Vec_PtrAlloc( Vec_PtrSize(p)/2 );
- assert( Vec_PtrSize(p) % 2 == 0 );
+ Vec_Ptr_t * pNew = Vec_PtrAlloc( Vec_PtrSize(p) - nOuts/2 );
+ assert( nOuts % 2 == 0 );
+ assert( nOuts <= Vec_PtrSize(p) );
Vec_PtrForEachEntryDouble( char *, char *, p, pName1, pName2, i )
{
+ if ( i == nOuts )
+ break;
sprintf( pBuffer, "%s_xor_%s", pName1, pName2 );
Vec_PtrPush( pNew, Abc_UtilStrsav(pBuffer) );
}
+ Vec_PtrForEachEntryStart( char *, p, pName1, i, i )
+ Vec_PtrPush( pNew, Abc_UtilStrsav(pName1) );
return pNew;
}
@@ -2878,7 +2883,7 @@ Gia_Man_t * Gia_ManTransformMiter( Gia_Man_t * p )
if ( p->vNamesIn )
pNew->vNamesIn = Vec_PtrDupStr(p->vNamesIn);
if ( p->vNamesOut )
- pNew->vNamesOut = Gia_ManMiterNames(p->vNamesOut);
+ pNew->vNamesOut = Gia_ManMiterNames(p->vNamesOut, Gia_ManPoNum(p));
return pNew;
}
Gia_Man_t * Gia_ManTransformMiter2( Gia_Man_t * p )