diff options
author | Alan Mishchenko <alanmi@berkeley.edu> | 2012-08-31 09:26:26 -0700 |
---|---|---|
committer | Alan Mishchenko <alanmi@berkeley.edu> | 2012-08-31 09:26:26 -0700 |
commit | 8c0e0d7143961f2f575478ca815438817587a90f (patch) | |
tree | faaceda1d9a40c8ae90ad2d4ad58bca76181fe85 /src/map/scl/sclSize.c | |
parent | e63c603e926d85040503d6a6caf73419d1837bae (diff) | |
download | abc-8c0e0d7143961f2f575478ca815438817587a90f.tar.gz abc-8c0e0d7143961f2f575478ca815438817587a90f.tar.bz2 abc-8c0e0d7143961f2f575478ca815438817587a90f.zip |
Added command 'print_gs' to print gate sizes in the mapping.
Diffstat (limited to 'src/map/scl/sclSize.c')
-rw-r--r-- | src/map/scl/sclSize.c | 33 |
1 files changed, 32 insertions, 1 deletions
diff --git a/src/map/scl/sclSize.c b/src/map/scl/sclSize.c index 3baeb2c2..4be4fd5b 100644 --- a/src/map/scl/sclSize.c +++ b/src/map/scl/sclSize.c @@ -246,7 +246,7 @@ Vec_Int_t * Abc_SclCollectTfo( Abc_Ntk_t * p, Abc_Obj_t * pObj, Vec_Int_t * vPiv SeeAlso [] ***********************************************************************/ -SC_Cell * Abc_SclObjResiable( SC_Man * p, Abc_Obj_t * pObj, int fUpsize ) +static inline SC_Cell * Abc_SclObjResiable( SC_Man * p, Abc_Obj_t * pObj, int fUpsize ) { SC_Cell * pOld = Abc_SclObjCell( p, pObj ); if ( fUpsize ) @@ -353,6 +353,37 @@ void Abc_SclUpdateNetwork( SC_Man * p, Abc_Obj_t * pObj, int nCone, int fUpsize, } } + +/**Function************************************************************* + + Synopsis [Begin by upsizing gates will many fanouts.] + + Description [] + + SideEffects [] + + SeeAlso [] + +***********************************************************************/ +void Abc_SclManUpsize( SC_Man * p ) +{ + SC_Cell * pOld, * pNew; + Abc_Obj_t * pObj; + int i; + Abc_NtkForEachNode1( p->pNtk, pObj, i ) + { + if ( Abc_ObjFanoutNum(pObj) <= 2 ) + continue; + // find new gate + pOld = Abc_SclObjCell( p, pObj ); + pNew = Abc_SclObjResiable( p, pObj, 1 ); + if ( pNew == NULL ) + continue; + Vec_IntWriteEntry( p->vGates, Abc_ObjId(pObj), Abc_SclCellFind(p->pLib, pNew->pName) ); + } +} + + /**Function************************************************************* Synopsis [] |