diff options
Diffstat (limited to 'src/aig/gia/giaDup.c')
-rw-r--r-- | src/aig/gia/giaDup.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/aig/gia/giaDup.c b/src/aig/gia/giaDup.c index 5e233690..6bf37a86 100644 --- a/src/aig/gia/giaDup.c +++ b/src/aig/gia/giaDup.c @@ -2487,15 +2487,20 @@ Gia_Man_t * Gia_ManDupZeroUndc( Gia_Man_t * p, char * pInit, int fVerbose ) if ( CountPis > Gia_ManPiNum(p) ) iResetFlop = Gia_ManAppendCi( pNew ); // update flop outputs + Gia_ManMarkFanoutDrivers( p ); Gia_ManForEachRo( p, pObj, i ) { if ( pInit[i] == '1' ) pObj->Value = Abc_LitNot(pObj->Value), Count1++; else if ( pInit[i] == 'x' || pInit[i] == 'X' ) - pObj->Value = Gia_ManAppendMux( pNew, iResetFlop, pObj->Value, Gia_Obj2Lit(pNew, Gia_ManPi(pNew, pPiLits[i])) ); + { + if ( pObj->fMark0 ) // only add MUX if the flop has fanout + pObj->Value = Gia_ManAppendMux( pNew, iResetFlop, pObj->Value, Gia_Obj2Lit(pNew, Gia_ManPi(pNew, pPiLits[i])) ); + } else if ( pInit[i] != '0' ) assert( 0 ); } + Gia_ManCleanMark0( p ); ABC_FREE( pPiLits ); // build internal nodes Gia_ManForEachAnd( p, pObj, i ) |