Commit 2bc14356 by Alan Mishchenko

More tuning in &nf.

parent 34fa6add
...@@ -1396,7 +1396,7 @@ void Nf_ManSetOutputRequireds( Nf_Man_t * p, int fPropCompl ) ...@@ -1396,7 +1396,7 @@ void Nf_ManSetOutputRequireds( Nf_Man_t * p, int fPropCompl )
{ {
Gia_Obj_t * pObj; Gia_Obj_t * pObj;
word Required = 0; word Required = 0;
int i, nLits = 2*Gia_ManObjNum(p->pGia); int i, iObj, fCompl, nLits = 2*Gia_ManObjNum(p->pGia);
Vec_WrdFill( &p->vRequired, nLits, NF_INFINITY ); Vec_WrdFill( &p->vRequired, nLits, NF_INFINITY );
// compute delay // compute delay
p->pPars->WordMapDelay = 0; p->pPars->WordMapDelay = 0;
...@@ -1419,7 +1419,9 @@ void Nf_ManSetOutputRequireds( Nf_Man_t * p, int fPropCompl ) ...@@ -1419,7 +1419,9 @@ void Nf_ManSetOutputRequireds( Nf_Man_t * p, int fPropCompl )
// set required times // set required times
Gia_ManForEachCo( p->pGia, pObj, i ) Gia_ManForEachCo( p->pGia, pObj, i )
{ {
Required = Nf_ObjMatchD( p, Gia_ObjFaninId0p(p->pGia, pObj), Gia_ObjFaninC0(pObj) )->D; iObj = Gia_ObjFaninId0p(p->pGia, pObj);
fCompl = Gia_ObjFaninC0(pObj);
Required = Nf_ObjMatchD(p, iObj, fCompl)->D;
Required = p->pPars->fDoAverage ? Required * (100 + p->pPars->nRelaxRatio) / 100 : p->pPars->WordMapDelay; Required = p->pPars->fDoAverage ? Required * (100 + p->pPars->nRelaxRatio) / 100 : p->pPars->WordMapDelay;
// if external required time can be achieved, use it // if external required time can be achieved, use it
if ( p->pGia->vOutReqs && Vec_FltEntry(p->pGia->vOutReqs, i) > 0 && Required <= (word)(MIO_NUM * Vec_FltEntry(p->pGia->vOutReqs, i)) ) if ( p->pGia->vOutReqs && Vec_FltEntry(p->pGia->vOutReqs, i) > 0 && Required <= (word)(MIO_NUM * Vec_FltEntry(p->pGia->vOutReqs, i)) )
...@@ -1428,9 +1430,9 @@ void Nf_ManSetOutputRequireds( Nf_Man_t * p, int fPropCompl ) ...@@ -1428,9 +1430,9 @@ void Nf_ManSetOutputRequireds( Nf_Man_t * p, int fPropCompl )
// else if ( p->pGia->vOutReqs && Vec_FltEntry(p->pGia->vOutReqs, i) > 0 && Required > Vec_FltEntry(p->pGia->vOutReqs, i) ) // else if ( p->pGia->vOutReqs && Vec_FltEntry(p->pGia->vOutReqs, i) > 0 && Required > Vec_FltEntry(p->pGia->vOutReqs, i) )
// ptTime->Rise = ptTime->Fall = ptTime->Worst = Required; // ptTime->Rise = ptTime->Fall = ptTime->Worst = Required;
// otherwise, set the global required time // otherwise, set the global required time
Nf_ObjUpdateRequired( p, Gia_ObjFaninId0p(p->pGia, pObj), Gia_ObjFaninC0(pObj), Required ); Nf_ObjUpdateRequired( p, iObj, fCompl, Required );
if ( fPropCompl && Nf_ObjMatchBest(p, Gia_ObjFaninId0p(p->pGia, pObj), Gia_ObjFaninC0(pObj) )->fCompl ) if ( fPropCompl && iObj > 0 && Nf_ObjMatchBest(p, iObj, fCompl)->fCompl )
Nf_ObjUpdateRequired( p, Gia_ObjFaninId0p(p->pGia, pObj), !Gia_ObjFaninC0(pObj), Required - p->InvDelay ); Nf_ObjUpdateRequired( p, iObj, !fCompl, Required - p->InvDelay );
//Nf_ObjMapRefInc( p, Gia_ObjFaninId0p(p->pGia, pObj), Gia_ObjFaninC0(pObj)); //Nf_ObjMapRefInc( p, Gia_ObjFaninId0p(p->pGia, pObj), Gia_ObjFaninC0(pObj));
} }
} }
......
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