diff options
author | Alan Mishchenko <alanmi@berkeley.edu> | 2007-12-26 08:01:00 -0800 |
---|---|---|
committer | Alan Mishchenko <alanmi@berkeley.edu> | 2007-12-26 08:01:00 -0800 |
commit | 676ba9ee213ea716fd154abbf983aaabf960db65 (patch) | |
tree | 02e3b39653c9f842c84d57631ced8a214c1d58c5 /src/map | |
parent | 00e9c3d06b590b0aac04bafddfd14115d14760f8 (diff) | |
download | abc-676ba9ee213ea716fd154abbf983aaabf960db65.tar.gz abc-676ba9ee213ea716fd154abbf983aaabf960db65.tar.bz2 abc-676ba9ee213ea716fd154abbf983aaabf960db65.zip |
Version abc71226
Diffstat (limited to 'src/map')
-rw-r--r-- | src/map/if/if.h | 1 | ||||
-rw-r--r-- | src/map/if/ifUtil.c | 42 | ||||
-rw-r--r-- | src/map/pcm/module.make | 0 | ||||
-rw-r--r-- | src/map/ply/module.make | 0 |
4 files changed, 43 insertions, 0 deletions
diff --git a/src/map/if/if.h b/src/map/if/if.h index 1b82f9a0..17040742 100644 --- a/src/map/if/if.h +++ b/src/map/if/if.h @@ -381,6 +381,7 @@ extern void If_ManCleanMarkV( If_Man_t * p ); extern float If_ManDelayMax( If_Man_t * p, int fSeq ); extern void If_ManComputeRequired( If_Man_t * p ); extern float If_ManScanMapping( If_Man_t * p ); +extern float If_ManScanMappingDirect( If_Man_t * p ); extern float If_ManScanMappingSeq( If_Man_t * p ); extern void If_ManResetOriginalRefs( If_Man_t * p ); extern int If_ManCrossCut( If_Man_t * p ); diff --git a/src/map/if/ifUtil.c b/src/map/if/ifUtil.c index f3fa049e..f4fcf94a 100644 --- a/src/map/if/ifUtil.c +++ b/src/map/if/ifUtil.c @@ -290,6 +290,48 @@ float If_ManScanMapping( If_Man_t * p ) Synopsis [Computes area, references, and nodes used in the mapping.] + Description [Collects the nodes in reverse topological order in array + p->vMapping.] + + SideEffects [] + + SeeAlso [] + +***********************************************************************/ +float If_ManScanMappingDirect( If_Man_t * p ) +{ + If_Obj_t * pObj, ** ppStore; + float aArea; + int i; + assert( !p->pPars->fLiftLeaves ); + // clean all references + If_ManForEachObj( p, pObj, i ) + { + pObj->Required = IF_FLOAT_LARGE; + pObj->nVisits = pObj->nVisitsCopy; + pObj->nRefs = 0; + } + // allocate place to store the nodes + ppStore = ALLOC( If_Obj_t *, p->nLevelMax + 1 ); + memset( ppStore, 0, sizeof(If_Obj_t *) * (p->nLevelMax + 1) ); + // collect nodes reachable from POs in the DFS order through the best cuts + aArea = 0; + If_ManForEachCo( p, pObj, i ) + aArea += If_ManScanMapping_rec( p, If_ObjFanin0(pObj), ppStore ); + // reconnect the nodes in reverse topological order + Vec_PtrClear( p->vMapped ); +// for ( i = p->nLevelMax; i >= 0; i-- ) + for ( i = 0; i <= p->nLevelMax; i++ ) + for ( pObj = ppStore[i]; pObj; pObj = pObj->pCopy ) + Vec_PtrPush( p->vMapped, pObj ); + free( ppStore ); + return aArea; +} + +/**Function************************************************************* + + Synopsis [Computes area, references, and nodes used in the mapping.] + Description [] SideEffects [] diff --git a/src/map/pcm/module.make b/src/map/pcm/module.make deleted file mode 100644 index e69de29b..00000000 --- a/src/map/pcm/module.make +++ /dev/null diff --git a/src/map/ply/module.make b/src/map/ply/module.make deleted file mode 100644 index e69de29b..00000000 --- a/src/map/ply/module.make +++ /dev/null |