diff options
author | Alan Mishchenko <alanmi@berkeley.edu> | 2018-09-20 14:34:59 -0700 |
---|---|---|
committer | Alan Mishchenko <alanmi@berkeley.edu> | 2018-09-20 14:34:59 -0700 |
commit | c861635cddb43f41873c1fc4246bea9aede24c14 (patch) | |
tree | 482b47c8aed3de7463f2c9c9662f601497dcc974 /src | |
parent | 0dec03ba4d4d359b1a7711f1c594c9f936108969 (diff) | |
download | abc-c861635cddb43f41873c1fc4246bea9aede24c14.tar.gz abc-c861635cddb43f41873c1fc4246bea9aede24c14.tar.bz2 abc-c861635cddb43f41873c1fc4246bea9aede24c14.zip |
Preserving output names while deriving a miter.
Diffstat (limited to 'src')
-rw-r--r-- | src/aig/gia/giaDup.c | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/src/aig/gia/giaDup.c b/src/aig/gia/giaDup.c index 55d24cfd..923fbbad 100644 --- a/src/aig/gia/giaDup.c +++ b/src/aig/gia/giaDup.c @@ -2815,6 +2815,30 @@ Gia_Man_t * Gia_ManDupAndOr( Gia_Man_t * p, int nOuts, int fUseOr, int fCompl ) /**Function************************************************************* + Synopsis [Transforms output names.] + + Description [] + + SideEffects [] + + SeeAlso [] + +***********************************************************************/ +Vec_Ptr_t * Gia_ManMiterNames( Vec_Ptr_t * p ) +{ + char * pName1, * pName2, pBuffer[1000]; int i; + Vec_Ptr_t * pNew = Vec_PtrAlloc( Vec_PtrSize(p)/2 ); + assert( Vec_PtrSize(p) % 2 == 0 ); + Vec_PtrForEachEntryDouble( char *, char *, p, pName1, pName2, i ) + { + sprintf( pBuffer, "%s_xor_%s", pName1, pName2 ); + Vec_PtrPush( pNew, Abc_UtilStrsav(pBuffer) ); + } + return pNew; +} + +/**Function************************************************************* + Synopsis [Transforms the circuit into a regular miter.] Description [] @@ -2853,6 +2877,8 @@ Gia_Man_t * Gia_ManTransformMiter( Gia_Man_t * p ) Gia_ManStop( pTemp ); if ( p->vNamesIn ) pNew->vNamesIn = Vec_PtrDupStr(p->vNamesIn); + if ( p->vNamesOut ) + pNew->vNamesOut = Gia_ManMiterNames(p->vNamesOut); return pNew; } Gia_Man_t * Gia_ManTransformMiter2( Gia_Man_t * p ) |