Commit 32b07625 by Alan Mishchenko

Preventing &iso from removing fanoutless PIs.

parent e6b16e27
......@@ -690,7 +690,7 @@ extern Gia_Man_t * Gia_ManDupWithConstraints( Gia_Man_t * p, Vec_Int_t *
extern Gia_Man_t * Gia_ManDupAbsFlops( Gia_Man_t * p, Vec_Int_t * vFlopClasses );
extern Gia_Man_t * Gia_ManDupAbsGates( Gia_Man_t * p, Vec_Int_t * vGateClasses );
extern Vec_Int_t * Gia_GlaCollectAssigned( Gia_Man_t * p, Vec_Int_t * vGateClasses );
extern Gia_Man_t * Gia_ManDupCones( Gia_Man_t * p, int * pPos, int nPos );
extern Gia_Man_t * Gia_ManDupCones( Gia_Man_t * p, int * pPos, int nPos, int fTrimPis );
/*=== giaEnable.c ==========================================================*/
extern void Gia_ManDetectSeqSignals( Gia_Man_t * p, int fSetReset, int fVerbose );
extern Gia_Man_t * Gia_ManUnrollAndCofactor( Gia_Man_t * p, int nFrames, int nFanMax, int fVerbose );
......
......@@ -1850,7 +1850,7 @@ void Gia_ManDupCones_rec( Gia_Man_t * p, Gia_Obj_t * pObj, Vec_Ptr_t * vLeaves,
Vec_PtrPush( vLeaves, pObj );
else assert( 0 );
}
Gia_Man_t * Gia_ManDupCones( Gia_Man_t * p, int * pPos, int nPos )
Gia_Man_t * Gia_ManDupCones( Gia_Man_t * p, int * pPos, int nPos, int fTrimPis )
{
Gia_Man_t * pNew;
Vec_Ptr_t * vLeaves, * vNodes, * vRoots;
......@@ -1877,8 +1877,16 @@ Gia_Man_t * Gia_ManDupCones( Gia_Man_t * p, int * pPos, int nPos )
// map the constant node
Gia_ManConst0(p)->Value = 0;
// create PIs
Vec_PtrForEachEntry( Gia_Obj_t *, vLeaves, pObj, i )
pObj->Value = Gia_ManAppendCi( pNew );
if ( fTrimPis )
{
Vec_PtrForEachEntry( Gia_Obj_t *, vLeaves, pObj, i )
pObj->Value = Gia_ManAppendCi( pNew );
}
else
{
Gia_ManForEachPi( p, pObj, i )
pObj->Value = Gia_ManAppendCi( pNew );
}
// create LOs
Vec_PtrForEachEntryStart( Gia_Obj_t *, vRoots, pObj, i, nPos )
Gia_ObjRiToRo(p, pObj)->Value = Gia_ManAppendCi( pNew );
......
......@@ -1024,7 +1024,7 @@ Vec_Str_t * Gia_ManIsoFindString( Gia_Man_t * p, int iPo, int fVerbose )
Vec_Int_t * vCis, * vAnds, * vCos;
Vec_Str_t * vStr;
// duplicate
pPart = Gia_ManDupCones( p, &iPo, 1 );
pPart = Gia_ManDupCones( p, &iPo, 1, 1 );
assert( Gia_ManPoNum(pPart) == 1 );
if ( Gia_ManCiNum(pPart) == 0 ) // const AIG
{
......@@ -1167,7 +1167,7 @@ Gia_Man_t * Gia_ManIsoReduce( Gia_Man_t * pInit, Vec_Ptr_t ** pvPosEquivs, int f
// derive the resulting AIG
pPart = Gia_ManDupCones( p, Vec_IntArray(vRemain), Vec_IntSize(vRemain) );
pPart = Gia_ManDupCones( p, Vec_IntArray(vRemain), Vec_IntSize(vRemain), 0 );
Vec_IntFree( vRemain );
// report the results
if ( !fDualOut )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment