Commit 19ad75f1 by Alan Mishchenko

Migrating back to using 'float' in area-flow computation in &nf.

parent 6642e40a
...@@ -318,6 +318,7 @@ struct Jf_Par_t_ ...@@ -318,6 +318,7 @@ struct Jf_Par_t_
word WordMapDelayTarget; word WordMapDelayTarget;
float MapDelay; float MapDelay;
float MapArea; float MapArea;
float MapAreaF;
float MapDelayTarget; float MapDelayTarget;
float Epsilon; float Epsilon;
float * pTimesArr; float * pTimesArr;
......
...@@ -62,7 +62,8 @@ struct Mio_Cell2_t_ ...@@ -62,7 +62,8 @@ struct Mio_Cell2_t_
unsigned Id : 26; // gate ID unsigned Id : 26; // gate ID
unsigned Type : 2; // gate type unsigned Type : 2; // gate type
unsigned nFanins : 4; // gate fanins unsigned nFanins : 4; // gate fanins
word Area; // area float AreaF; // area
word AreaW; // area
word uTruth; // truth table word uTruth; // truth table
word DelayAve; // average delay word DelayAve; // average delay
word Delays[6]; // delay word Delays[6]; // delay
......
...@@ -338,9 +338,9 @@ int Mio_AreaCompare2( Mio_Cell2_t * pG1, Mio_Cell2_t * pG2 ) ...@@ -338,9 +338,9 @@ int Mio_AreaCompare2( Mio_Cell2_t * pG1, Mio_Cell2_t * pG2 )
return -1; return -1;
if ( pG1->nFanins > pG2->nFanins ) if ( pG1->nFanins > pG2->nFanins )
return 1; return 1;
if ( pG1->Area < pG2->Area ) if ( pG1->AreaW < pG2->AreaW )
return -1; return -1;
if ( pG1->Area > pG2->Area ) if ( pG1->AreaW > pG2->AreaW )
return 1; return 1;
// compare names // compare names
Comp = strcmp( pG1->pName, pG2->pName ); Comp = strcmp( pG1->pName, pG2->pName );
...@@ -630,9 +630,9 @@ static inline int Mio_CompareTwo2( Mio_Cell2_t * pCell1, Mio_Cell2_t * pCell2 ) ...@@ -630,9 +630,9 @@ static inline int Mio_CompareTwo2( Mio_Cell2_t * pCell1, Mio_Cell2_t * pCell2 )
{ {
int Comp; int Comp;
// compare areas // compare areas
if ( pCell1->Area > pCell2->Area ) if ( pCell1->AreaW > pCell2->AreaW )
return 1; return 1;
if ( pCell1->Area < pCell2->Area ) if ( pCell1->AreaW < pCell2->AreaW )
return 0; return 0;
// compare delays // compare delays
if ( pCell1->DelayAve > pCell2->DelayAve ) if ( pCell1->DelayAve > pCell2->DelayAve )
...@@ -654,7 +654,8 @@ static inline void Mio_CollectCopy2( Mio_Cell2_t * pCell, Mio_Gate_t * pGate ) ...@@ -654,7 +654,8 @@ static inline void Mio_CollectCopy2( Mio_Cell2_t * pCell, Mio_Gate_t * pGate )
pCell->pName = pGate->pName; pCell->pName = pGate->pName;
pCell->vExpr = pGate->vExpr; pCell->vExpr = pGate->vExpr;
pCell->uTruth = pGate->uTruth; 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->nFanins = pGate->nInputs;
pCell->pMioGate = pGate; pCell->pMioGate = pGate;
pCell->DelayAve = 0; pCell->DelayAve = 0;
...@@ -757,7 +758,7 @@ Mio_Cell2_t * Mio_CollectRootsNew2( Mio_Library_t * pLib, int nInputs, int * pnG ...@@ -757,7 +758,7 @@ Mio_Cell2_t * Mio_CollectRootsNew2( Mio_Library_t * pLib, int nInputs, int * pnG
printf( "None\n" ); printf( "None\n" );
else else
printf( "%-20s In = %d N = %3d A = %12.6f D = %12.6f\n", 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 ); ABC_FREE( pCounts );
} }
......
...@@ -323,7 +323,7 @@ void Sfm_LibPrepareAdd( Sfm_Lib_t * p, word * pTruth, int * Perm, int nFanins, M ...@@ -323,7 +323,7 @@ void Sfm_LibPrepareAdd( Sfm_Lib_t * p, word * pTruth, int * Perm, int nFanins, M
{ {
Sfm_Fun_t * pObj; Sfm_Fun_t * pObj;
int InvPerm[SFM_SUPP_MAX], Profile[SFM_SUPP_MAX]; int InvPerm[SFM_SUPP_MAX], Profile[SFM_SUPP_MAX];
int Area = (int)pCellBot->Area + (pCellTop ? (int)pCellTop->Area : 0); int Area = (int)pCellBot->AreaW + (pCellTop ? (int)pCellTop->AreaW : 0);
int i, k, Id, Prev, Offset, * pProf, iFunc = Vec_MemHashInsert( p->vTtMem, pTruth ); int i, k, Id, Prev, Offset, * pProf, iFunc = Vec_MemHashInsert( p->vTtMem, pTruth );
if ( iFunc == Vec_IntSize(&p->vLists) ) if ( iFunc == Vec_IntSize(&p->vLists) )
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment