Commit c158dd5a by Alan Mishchenko

Migrating to using 32-bit timing representation in &nf.

parent 19ad75f1
......@@ -65,8 +65,8 @@ struct Mio_Cell2_t_
float AreaF; // area
word AreaW; // area
word uTruth; // truth table
word DelayAve; // average delay
word Delays[6]; // delay
int iDelayAve; // average delay
int iDelays[6]; // delay
void * pMioGate; // gate pointer
};
......
......@@ -635,9 +635,9 @@ static inline int Mio_CompareTwo2( Mio_Cell2_t * pCell1, Mio_Cell2_t * pCell2 )
if ( pCell1->AreaW < pCell2->AreaW )
return 0;
// compare delays
if ( pCell1->DelayAve > pCell2->DelayAve )
if ( pCell1->iDelayAve > pCell2->iDelayAve )
return 1;
if ( pCell1->DelayAve < pCell2->DelayAve )
if ( pCell1->iDelayAve < pCell2->iDelayAve )
return 0;
// compare names
Comp = strcmp( pCell1->pName, pCell2->pName );
......@@ -651,21 +651,21 @@ static inline int Mio_CompareTwo2( Mio_Cell2_t * pCell1, Mio_Cell2_t * pCell2 )
static inline void Mio_CollectCopy2( Mio_Cell2_t * pCell, Mio_Gate_t * pGate )
{
Mio_Pin_t * pPin; int k;
pCell->pName = pGate->pName;
pCell->vExpr = pGate->vExpr;
pCell->uTruth = pGate->uTruth;
pCell->AreaF = pGate->dArea;
pCell->AreaW = (word)(MIO_NUM * pGate->dArea);
pCell->nFanins = pGate->nInputs;
pCell->pMioGate = pGate;
pCell->DelayAve = 0;
pCell->pName = pGate->pName;
pCell->vExpr = pGate->vExpr;
pCell->uTruth = pGate->uTruth;
pCell->AreaF = pGate->dArea;
pCell->AreaW = (word)(MIO_NUM * pGate->dArea);
pCell->nFanins = pGate->nInputs;
pCell->pMioGate = pGate;
pCell->iDelayAve = 0;
for ( k = 0, pPin = pGate->pPins; pPin; pPin = pPin->pNext, k++ )
{
pCell->Delays[k] = (word)(MIO_NUM/2 * pPin->dDelayBlockRise + MIO_NUM/2 * pPin->dDelayBlockFall);
pCell->DelayAve += pCell->Delays[k];
pCell->iDelays[k] = (int)(MIO_NUM/2 * pPin->dDelayBlockRise + MIO_NUM/2 * pPin->dDelayBlockFall);
pCell->iDelayAve += pCell->iDelays[k];
}
if ( pCell->nFanins )
pCell->DelayAve /= pCell->nFanins;
pCell->iDelayAve /= pCell->nFanins;
}
Mio_Cell2_t * Mio_CollectRootsNew2( Mio_Library_t * pLib, int nInputs, int * pnGates, int fVerbose )
......@@ -758,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], pCell->AreaF, MIO_NUMINV*(unsigned)pCell->DelayAve );
pCell->pName, pCell->nFanins, pCounts[i], pCell->AreaF, MIO_NUMINV*pCell->iDelayAve );
}
ABC_FREE( pCounts );
}
......
......@@ -290,14 +290,14 @@ void Sfm_LibTruth8Two( Mio_Cell2_t * pCellBot, Mio_Cell2_t * pCellTop, int InTop
***********************************************************************/
void Sfm_LibCellProfile( Mio_Cell2_t * pCellBot, Mio_Cell2_t * pCellTop, int InTop, int nFanins, int * Perm, int * pProf )
{
int i, DelayAdd = (int)(pCellTop ? pCellTop->Delays[InTop] : 0);
int i, DelayAdd = pCellTop ? pCellTop->iDelays[InTop] : 0;
for ( i = 0; i < nFanins; i++ )
if ( Perm[i] < (int)pCellBot->nFanins )
pProf[i] = (int)pCellBot->Delays[Perm[i]] + DelayAdd;
pProf[i] = pCellBot->iDelays[Perm[i]] + DelayAdd;
else if ( Perm[i] < (int)pCellBot->nFanins + InTop )
pProf[i] = (int)pCellTop->Delays[Perm[i] - (int)pCellBot->nFanins];
pProf[i] = pCellTop->iDelays[Perm[i] - (int)pCellBot->nFanins];
else // if ( Perm[i] >= (int)pCellBot->nFanins + InTop )
pProf[i] = (int)pCellTop->Delays[Perm[i] - (int)pCellBot->nFanins + 1];
pProf[i] = pCellTop->iDelays[Perm[i] - (int)pCellBot->nFanins + 1];
}
static inline int Sfm_LibNewIsContained( Sfm_Fun_t * pObj, int * pProf, int Area, int * pProfNew, int nFanins )
{
......
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