diff options
author | Alan Mishchenko <alanmi@berkeley.edu> | 2017-09-04 15:57:00 -0700 |
---|---|---|
committer | Alan Mishchenko <alanmi@berkeley.edu> | 2017-09-04 15:57:00 -0700 |
commit | ecae67e3bf4580591d1bbadd02696b2490fd469d (patch) | |
tree | 0b7e3e8ad4d4ed32ba5876aa2a5a00ef633cb402 /src/aig/gia | |
parent | 2f95a58c0177590dff43702c88a3d10a59235116 (diff) | |
download | abc-ecae67e3bf4580591d1bbadd02696b2490fd469d.tar.gz abc-ecae67e3bf4580591d1bbadd02696b2490fd469d.tar.bz2 abc-ecae67e3bf4580591d1bbadd02696b2490fd469d.zip |
Several changes to various packages.
Diffstat (limited to 'src/aig/gia')
-rw-r--r-- | src/aig/gia/giaDup.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/aig/gia/giaDup.c b/src/aig/gia/giaDup.c index b05c8636..477c44dc 100644 --- a/src/aig/gia/giaDup.c +++ b/src/aig/gia/giaDup.c @@ -764,6 +764,27 @@ Gia_Man_t * Gia_ManDupWithAttributes( Gia_Man_t * p ) pNew->pCellStr = Abc_UtilStrsav( p->pCellStr ); return pNew; } +Gia_Man_t * Gia_ManDupRemovePis( Gia_Man_t * p, int nRemPis ) +{ + Gia_Man_t * pNew; + Gia_Obj_t * pObj; + int i; + pNew = Gia_ManStart( Gia_ManObjNum(p) ); + pNew->pName = Abc_UtilStrsav( p->pName ); + pNew->pSpec = Abc_UtilStrsav( p->pSpec ); + Gia_ManConst0(p)->Value = 0; + Gia_ManForEachObj1( p, pObj, i ) + { + if ( Gia_ObjIsAnd(pObj) ) + pObj->Value = Gia_ManAppendAnd( pNew, Gia_ObjFanin0Copy(pObj), Gia_ObjFanin1Copy(pObj) ); + else if ( Gia_ObjIsCi(pObj) && Gia_ObjCioId(pObj) < Gia_ManCiNum(p)-nRemPis ) + pObj->Value = Gia_ManAppendCi( pNew ); + else if ( Gia_ObjIsCo(pObj) ) + pObj->Value = Gia_ManAppendCo( pNew, Gia_ObjFanin0Copy(pObj) ); + } + Gia_ManSetRegNum( pNew, Gia_ManRegNum(p) ); + return pNew; +} /**Function************************************************************* |