Commit 62487de9 by Alan Mishchenko

Adding support for user-specified wire delays in &if.

parent 712f46ca
...@@ -36980,8 +36980,24 @@ int Abc_CommandAbc9If( Abc_Frame_t * pAbc, int argc, char ** argv ) ...@@ -36980,8 +36980,24 @@ int Abc_CommandAbc9If( Abc_Frame_t * pAbc, int argc, char ** argv )
return 1; return 1;
} }
// add wire delay to LUT library delays
if ( pPars->WireDelay > 0 && pPars->pLutLib )
{
int i, k;
for ( i = 0; i <= pPars->pLutLib->LutMax; i++ )
for ( k = 0; k <= i; k++ )
pPars->pLutLib->pLutDelays[i][k] += pPars->WireDelay;
}
// perform mapping // perform mapping
pNew = Gia_ManPerformMapping( pAbc->pGia, pPars ); pNew = Gia_ManPerformMapping( pAbc->pGia, pPars );
// subtract wire delay from LUT library delays
if ( pPars->WireDelay > 0 && pPars->pLutLib )
{
int i, k;
for ( i = 0; i <= pPars->pLutLib->LutMax; i++ )
for ( k = 0; k <= i; k++ )
pPars->pLutLib->pLutDelays[i][k] -= pPars->WireDelay;
}
if ( pNew == NULL ) if ( pNew == NULL )
{ {
Abc_Print( -1, "Abc_CommandAbc9If(): Mapping of GIA has failed.\n" ); Abc_Print( -1, "Abc_CommandAbc9If(): Mapping of GIA has failed.\n" );
...@@ -217,7 +217,7 @@ void If_ObjPerformMappingAnd( If_Man_t * p, If_Obj_t * pObj, int Mode, int fPrep ...@@ -217,7 +217,7 @@ void If_ObjPerformMappingAnd( If_Man_t * p, If_Obj_t * pObj, int Mode, int fPrep
assert( pCut->Delay != -1 ); assert( pCut->Delay != -1 );
// assert( pCut->Delay <= pObj->Required + p->fEpsilon ); // assert( pCut->Delay <= pObj->Required + p->fEpsilon );
if ( pCut->Delay > pObj->Required + 2*p->fEpsilon ) if ( pCut->Delay > pObj->Required + 2*p->fEpsilon )
Abc_Print( 1, "If_ObjPerformMappingAnd(): Warning! Delay of node %d (%f) exceeds the required times (%f).\n", Abc_Print( 1, "If_ObjPerformMappingAnd(): Warning! Node with ID %d has delay (%f) exceeding the required times (%f).\n",
pObj->Id, pCut->Delay, pObj->Required + p->fEpsilon ); pObj->Id, pCut->Delay, pObj->Required + p->fEpsilon );
pCut->Area = (Mode == 2)? If_CutAreaDerefed( p, pCut ) : If_CutAreaFlow( p, pCut ); pCut->Area = (Mode == 2)? If_CutAreaDerefed( p, pCut ) : If_CutAreaFlow( p, pCut );
if ( p->pPars->fEdge ) if ( p->pPars->fEdge )
......
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