diff options
author | Alan Mishchenko <alanmi@berkeley.edu> | 2015-10-04 09:51:57 -0700 |
---|---|---|
committer | Alan Mishchenko <alanmi@berkeley.edu> | 2015-10-04 09:51:57 -0700 |
commit | 26dc25b7f5e23689636b4d89b98281e821cf7fe8 (patch) | |
tree | ff4e262b60ac139762f75925f22dde402cb17a2b /src/aig/gia/giaSweep.c | |
parent | 7d9e3c2ffe131098a48e493eb9890c551144200b (diff) | |
download | abc-26dc25b7f5e23689636b4d89b98281e821cf7fe8.tar.gz abc-26dc25b7f5e23689636b4d89b98281e821cf7fe8.tar.bz2 abc-26dc25b7f5e23689636b4d89b98281e821cf7fe8.zip |
Adding support for flop init-states in extended AIG.
Diffstat (limited to 'src/aig/gia/giaSweep.c')
-rw-r--r-- | src/aig/gia/giaSweep.c | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/src/aig/gia/giaSweep.c b/src/aig/gia/giaSweep.c index e6ee618e..06e49f1f 100644 --- a/src/aig/gia/giaSweep.c +++ b/src/aig/gia/giaSweep.c @@ -154,13 +154,24 @@ Gia_Man_t * Gia_ManDupWithBoxes( Gia_Man_t * p, int fSeq ) if ( fSeq ) { pNew->vRegClasses = Vec_IntAlloc( Gia_ManRegBoxNum(p) ); + if ( p->vRegInits ) + pNew->vRegInits = Vec_IntAlloc( Gia_ManRegBoxNum(p) ); iShift = Gia_ManPoNum(p) - Gia_ManRegBoxNum(p); for ( i = 0; i < Gia_ManRegBoxNum(p); i++ ) if ( Gia_ObjIsTravIdCurrent(p, Gia_ManCo(p, iShift + i)) ) + { Vec_IntPush( pNew->vRegClasses, Vec_IntEntry(p->vRegClasses, i) ); + if ( p->vRegInits ) + Vec_IntPush( pNew->vRegInits, Vec_IntEntry(p->vRegInits, i) ); + } + } + else + { + if ( p->vRegClasses ) + pNew->vRegClasses = Vec_IntDup( p->vRegClasses ); + if ( p->vRegInits ) + pNew->vRegInits = Vec_IntDup( p->vRegInits ); } - else if ( p->vRegClasses ) - pNew->vRegClasses = Vec_IntDup( p->vRegClasses ); // collect remaining boxes vBoxesLeft = Vec_IntAlloc( Gia_ManBoxNum(p) ); curCi = Tim_ManPiNum(pManTime); |