mirror of
https://github.com/YosysHQ/abc.git
synced 2026-09-03 16:29:14 +02:00
Improvements to the hierarchy/timing manager.
This commit is contained in:
+2
-1
@@ -193,6 +193,7 @@ struct If_Man_t_
|
||||
int pPerm[3][IF_MAX_LUTSIZE]; // permutations
|
||||
unsigned uSharedMask; // mask of shared variables
|
||||
int nShared; // the number of shared variables
|
||||
int fReqTimeWarn; // warning about exceeding required times was printed
|
||||
// SOP balancing
|
||||
Vec_Int_t * vCover; // used to compute ISOP
|
||||
Vec_Wrd_t * vAnds; // intermediate storage
|
||||
@@ -318,7 +319,7 @@ struct If_Box_t_
|
||||
{
|
||||
char * pName;
|
||||
int Id;
|
||||
int fWhite;
|
||||
int fBlack;
|
||||
int nPis;
|
||||
int nPos;
|
||||
int * pDelays;
|
||||
|
||||
+1
-1
@@ -86,7 +86,7 @@ int If_ManPerformMappingComb( If_Man_t * p )
|
||||
// set arrival times and fanout estimates
|
||||
If_ManForEachCi( p, pObj, i )
|
||||
{
|
||||
If_ObjSetArrTime( pObj, p->pPars->pTimesArr[i] );
|
||||
If_ObjSetArrTime( pObj, p->pPars->pTimesArr ? p->pPars->pTimesArr[i] : (float)0.0 );
|
||||
pObj->EstRefs = (float)1.0;
|
||||
}
|
||||
|
||||
|
||||
@@ -45,13 +45,13 @@ ABC_NAMESPACE_IMPL_START
|
||||
SeeAlso []
|
||||
|
||||
***********************************************************************/
|
||||
If_Box_t * If_BoxStart( char * pName, int Id, int fWhite, int nPis, int nPos )
|
||||
If_Box_t * If_BoxStart( char * pName, int Id, int fBlack, int nPis, int nPos )
|
||||
{
|
||||
If_Box_t * p;
|
||||
p = ABC_CALLOC( If_Box_t, 1 );
|
||||
p->pName = pName; // consumes memory
|
||||
p->Id = Id;
|
||||
p->fWhite = fWhite;
|
||||
p->fBlack = fBlack;
|
||||
p->nPis = nPis;
|
||||
p->nPos = nPos;
|
||||
p->pDelays = ABC_CALLOC( int, nPis * nPos );
|
||||
@@ -202,7 +202,7 @@ If_LibBox_t * If_LibBoxRead( char * pFileName )
|
||||
pToken = If_LibBoxGetToken( pFile );
|
||||
nPos = atoi( pToken );
|
||||
// create box
|
||||
pBox = If_BoxStart( pName, Id, fWhite, nPis, nPos );
|
||||
pBox = If_BoxStart( pName, Id, !fWhite, nPis, nPos );
|
||||
If_LibBoxAdd( p, pBox );
|
||||
// read the table
|
||||
for ( i = 0; i < nPis * nPos; i++ )
|
||||
@@ -224,7 +224,7 @@ void If_LibBoxPrint( FILE * pFile, If_LibBox_t * p )
|
||||
fprintf( pFile, "# <Name> <ID> <Type> <I> <O>\n" );
|
||||
If_LibBoxForEachBox( p, pBox, i )
|
||||
{
|
||||
fprintf( pFile, "%s %d %d %d %d\n", pBox->pName, pBox->Id, pBox->fWhite, pBox->nPis, pBox->nPos );
|
||||
fprintf( pFile, "%s %d %d %d %d\n", pBox->pName, pBox->Id, !pBox->fBlack, pBox->nPis, pBox->nPos );
|
||||
for ( j = 0; j < pBox->nPos; j++, printf("\n") )
|
||||
for ( k = 0; k < pBox->nPis; k++ )
|
||||
if ( pBox->pDelays[j * pBox->nPis + k] == -1 )
|
||||
|
||||
+2
-4
@@ -189,10 +189,8 @@ void If_ManStop( If_Man_t * p )
|
||||
ABC_FREE( p->puTemp[0] );
|
||||
ABC_FREE( p->pCutTemp );
|
||||
// free pars memory
|
||||
if ( p->pPars->pTimesArr )
|
||||
ABC_FREE( p->pPars->pTimesArr );
|
||||
if ( p->pPars->pTimesReq )
|
||||
ABC_FREE( p->pPars->pTimesReq );
|
||||
ABC_FREE( p->pPars->pTimesArr );
|
||||
ABC_FREE( p->pPars->pTimesReq );
|
||||
if ( p->pManTim )
|
||||
Tim_ManStop( p->pManTim );
|
||||
if ( p->vSwitching )
|
||||
|
||||
@@ -294,6 +294,7 @@ void If_ManPerformMappingSeqPost( If_Man_t * p )
|
||||
{
|
||||
If_Obj_t * pObjLi, * pObjLo, * pObj;
|
||||
int i;
|
||||
assert( 0 );
|
||||
|
||||
// set arrival times
|
||||
assert( p->pPars->pTimesArr != NULL );
|
||||
|
||||
+9
-5
@@ -156,23 +156,27 @@ void If_ManComputeRequired( If_Man_t * p )
|
||||
if ( p->pManTim == NULL )
|
||||
{
|
||||
// consider the case when the required times are given
|
||||
if ( p->pPars->pTimesReq )
|
||||
if ( p->pPars->pTimesReq && !p->pPars->fAreaOnly )
|
||||
{
|
||||
assert( !p->pPars->fAreaOnly );
|
||||
// make sure that the required time hold
|
||||
Counter = 0;
|
||||
If_ManForEachCo( p, pObj, i )
|
||||
{
|
||||
if ( If_ObjArrTime(If_ObjFanin0(pObj)) > p->pPars->pTimesReq[i] + p->fEpsilon )
|
||||
{
|
||||
If_ObjFanin0(pObj)->Required = If_ObjArrTime(If_ObjFanin0(pObj));
|
||||
Counter++;
|
||||
// Abc_Print( 0, "Required times are violated for output %d (arr = %d; req = %d).\n",
|
||||
// i, (int)If_ObjArrTime(If_ObjFanin0(pObj)), (int)p->pPars->pTimesReq[i] );
|
||||
}
|
||||
If_ObjFanin0(pObj)->Required = p->pPars->pTimesReq[i];
|
||||
else
|
||||
If_ObjFanin0(pObj)->Required = p->pPars->pTimesReq[i];
|
||||
}
|
||||
if ( Counter && !p->fReqTimeWarn )
|
||||
{
|
||||
Abc_Print( 0, "Required times are exceeded at %d output%s. The earliest arrival times are used.\n", Counter, Counter > 1 ? "s":"" );
|
||||
p->fReqTimeWarn = 1;
|
||||
}
|
||||
if ( Counter )
|
||||
Abc_Print( 0, "Required times are violated for %d outputs.\n", Counter );
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user