From 19ad75f125e5a99014d8549233f1d120acea9677 Mon Sep 17 00:00:00 2001 From: Alan Mishchenko Date: Tue, 5 Jan 2016 14:05:07 -0800 Subject: Migrating back to using 'float' in area-flow computation in &nf. --- src/map/mio/mio.h | 3 ++- src/map/mio/mioUtils.c | 13 +++++++------ 2 files changed, 9 insertions(+), 7 deletions(-) (limited to 'src/map') diff --git a/src/map/mio/mio.h b/src/map/mio/mio.h index e4e15c6f..8fa3f71a 100644 --- a/src/map/mio/mio.h +++ b/src/map/mio/mio.h @@ -62,7 +62,8 @@ struct Mio_Cell2_t_ unsigned Id : 26; // gate ID unsigned Type : 2; // gate type unsigned nFanins : 4; // gate fanins - word Area; // area + float AreaF; // area + word AreaW; // area word uTruth; // truth table word DelayAve; // average delay word Delays[6]; // delay diff --git a/src/map/mio/mioUtils.c b/src/map/mio/mioUtils.c index 71ff2258..85b5c6d6 100644 --- a/src/map/mio/mioUtils.c +++ b/src/map/mio/mioUtils.c @@ -338,9 +338,9 @@ int Mio_AreaCompare2( Mio_Cell2_t * pG1, Mio_Cell2_t * pG2 ) return -1; if ( pG1->nFanins > pG2->nFanins ) return 1; - if ( pG1->Area < pG2->Area ) + if ( pG1->AreaW < pG2->AreaW ) return -1; - if ( pG1->Area > pG2->Area ) + if ( pG1->AreaW > pG2->AreaW ) return 1; // compare names Comp = strcmp( pG1->pName, pG2->pName ); @@ -630,9 +630,9 @@ static inline int Mio_CompareTwo2( Mio_Cell2_t * pCell1, Mio_Cell2_t * pCell2 ) { int Comp; // compare areas - if ( pCell1->Area > pCell2->Area ) + if ( pCell1->AreaW > pCell2->AreaW ) return 1; - if ( pCell1->Area < pCell2->Area ) + if ( pCell1->AreaW < pCell2->AreaW ) return 0; // compare delays if ( pCell1->DelayAve > pCell2->DelayAve ) @@ -654,7 +654,8 @@ static inline void Mio_CollectCopy2( Mio_Cell2_t * pCell, Mio_Gate_t * pGate ) pCell->pName = pGate->pName; pCell->vExpr = pGate->vExpr; pCell->uTruth = pGate->uTruth; - pCell->Area = (word)(MIO_NUM * pGate->dArea); + pCell->AreaF = pGate->dArea; + pCell->AreaW = (word)(MIO_NUM * pGate->dArea); pCell->nFanins = pGate->nInputs; pCell->pMioGate = pGate; pCell->DelayAve = 0; @@ -757,7 +758,7 @@ Mio_Cell2_t * Mio_CollectRootsNew2( Mio_Library_t * pLib, int nInputs, int * pnG printf( "None\n" ); else printf( "%-20s In = %d N = %3d A = %12.6f D = %12.6f\n", - pCell->pName, pCell->nFanins, pCounts[i], MIO_NUMINV*(unsigned)pCell->Area, MIO_NUMINV*(unsigned)pCell->DelayAve ); + pCell->pName, pCell->nFanins, pCounts[i], pCell->AreaF, MIO_NUMINV*(unsigned)pCell->DelayAve ); } ABC_FREE( pCounts ); } -- cgit v1.2.3