summaryrefslogtreecommitdiffstats
path: root/src/map
diff options
context:
space:
mode:
authorAlan Mishchenko <alanmi@berkeley.edu>2016-01-05 14:05:07 -0800
committerAlan Mishchenko <alanmi@berkeley.edu>2016-01-05 14:05:07 -0800
commit19ad75f125e5a99014d8549233f1d120acea9677 (patch)
tree96b13a36570b4b8d61b6effd523213e55962cef5 /src/map
parent6642e40af55770233f0f5db0153a8edc5bd774b6 (diff)
downloadabc-19ad75f125e5a99014d8549233f1d120acea9677.tar.gz
abc-19ad75f125e5a99014d8549233f1d120acea9677.tar.bz2
abc-19ad75f125e5a99014d8549233f1d120acea9677.zip
Migrating back to using 'float' in area-flow computation in &nf.
Diffstat (limited to 'src/map')
-rw-r--r--src/map/mio/mio.h3
-rw-r--r--src/map/mio/mioUtils.c13
2 files changed, 9 insertions, 7 deletions
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 );
}