mirror of https://github.com/YosysHQ/abc.git
Bug fix in deriving names for the miter output.
This commit is contained in:
parent
0a1fb03e3c
commit
6b554f10b8
|
|
@ -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 )
|
||||
|
|
|
|||
Loading…
Reference in New Issue