summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlan Mishchenko <alanmi@berkeley.edu>2012-05-20 22:18:23 +0700
committerAlan Mishchenko <alanmi@berkeley.edu>2012-05-20 22:18:23 +0700
commit77b83074e0caf86f5bab8fbf1d26c3d8f2dbb36a (patch)
tree14c19cfcdb05d34694c9617c15080c54ee252da2
parentc6af9094c092170b14d735097cdf805b90105287 (diff)
downloadabc-77b83074e0caf86f5bab8fbf1d26c3d8f2dbb36a.tar.gz
abc-77b83074e0caf86f5bab8fbf1d26c3d8f2dbb36a.tar.bz2
abc-77b83074e0caf86f5bab8fbf1d26c3d8f2dbb36a.zip
Changing 'if' to allow for delay optimization on sequential paths only.
-rw-r--r--src/map/if/if.h12
-rw-r--r--src/map/if/ifUtil.c5
2 files changed, 9 insertions, 8 deletions
diff --git a/src/map/if/if.h b/src/map/if/if.h
index 4c933a96..69878111 100644
--- a/src/map/if/if.h
+++ b/src/map/if/if.h
@@ -129,8 +129,10 @@ struct If_Par_t_
int fUseCnfs; // use local CNFs as a cost function
int fUseMv; // use local MV-SOPs as a cost function
int fUseAdders; // timing model for adders
- int nLatchesCi; // the number of latches in seq mapping
- int nLatchesCo; // the number of latches in seq mapping
+ int nLatchesCi; // the number of latches among the CIs
+ int nLatchesCo; // the number of latches among the COs
+ int nLatchesCiBox; // the number of white box outputs among the CIs
+ int nLatchesCoBox; // the number of white box inputs among the COs
int fLiftLeaves; // shift the leaves for seq mapping
int fUseCoAttrs; // use CO attributes
If_Lib_t * pLutLib; // the LUT library
@@ -381,15 +383,15 @@ static inline void If_AndClear( If_And_t * pNode ) { *
Vec_PtrForEachEntry( If_Obj_t *, p->vCos, pObj, i )
// iterator over the primary inputs
#define If_ManForEachPi( p, pObj, i ) \
- Vec_PtrForEachEntryStop( If_Obj_t *, p->vCis, pObj, i, If_ManCiNum(p) - p->pPars->nLatchesCi )
+ Vec_PtrForEachEntryStop( If_Obj_t *, p->vCis, pObj, i, If_ManCiNum(p) - p->pPars->nLatchesCi - p->pPars->nLatchesCiBox )
// iterator over the primary outputs
#define If_ManForEachPo( p, pObj, i ) \
- Vec_PtrForEachEntryStop( If_Obj_t *, p->vCos, pObj, i, If_ManCoNum(p) - p->pPars->nLatchesCo )
+ Vec_PtrForEachEntryStartStop( If_Obj_t *, p->vCos, pObj, i, p->pPars->nLatchesCoBox, If_ManCoNum(p) - p->pPars->nLatchesCo )
// iterator over the latches
#define If_ManForEachLatchInput( p, pObj, i ) \
Vec_PtrForEachEntryStart( If_Obj_t *, p->vCos, pObj, i, If_ManCoNum(p) - p->pPars->nLatchesCo )
#define If_ManForEachLatchOutput( p, pObj, i ) \
- Vec_PtrForEachEntryStart( If_Obj_t *, p->vCis, pObj, i, If_ManCiNum(p) - p->pPars->nLatchesCi )
+ Vec_PtrForEachEntryStartStop( If_Obj_t *, p->vCis, pObj, i, If_ManCiNum(p) - p->pPars->nLatchesCi - p->pPars->nLatchesCiBox, If_ManCiNum(p) - p->pPars->nLatchesCiBox )
// iterator over all objects in topological order
#define If_ManForEachObj( p, pObj, i ) \
Vec_PtrForEachEntry( If_Obj_t *, p->vObjs, pObj, i )
diff --git a/src/map/if/ifUtil.c b/src/map/if/ifUtil.c
index dee7ec3c..ccbb258e 100644
--- a/src/map/if/ifUtil.c
+++ b/src/map/if/ifUtil.c
@@ -279,11 +279,10 @@ void If_ManComputeRequired( If_Man_t * p )
}
else if ( p->pPars->fLatchPaths )
{
- assert( 0 );
If_ManForEachPo( p, pObj, i )
- Tim_ManSetCoRequired( p->pManTim, pObj->IdPio, IF_FLOAT_LARGE );
+ Tim_ManSetCoRequired( p->pManTim, i, IF_FLOAT_LARGE );
If_ManForEachLatchInput( p, pObj, i )
- Tim_ManSetCoRequired( p->pManTim, pObj->IdPio, p->RequiredGlo );
+ Tim_ManSetCoRequired( p->pManTim, i, p->RequiredGlo );
}
else
{