49 int k, iFan, Value = 0;
50 if ( Gia_ObjIsTravIdCurrentId(
p, iObj) )
51 return Vec_BitEntry(vPath, iObj);
52 Gia_ObjSetTravIdCurrentId(
p, iObj);
53 pObj = Gia_ManObj(
p, iObj );
54 if ( Gia_ObjIsCi(pObj) )
55 return Vec_BitEntry(vPath, iObj);
56 assert( Gia_ObjIsAnd(pObj) );
60 Vec_BitWriteEntry( vPath, iObj, 1 );
68 if ( !Vec_BitEntry(vPath, iObj) )
72 Gia_ObjSetTravIdCurrentId(
p, iFan);
91 if ( Gia_ObjIsTravIdCurrentId(
p, iObj) )
93 Gia_ObjSetTravIdCurrentId(
p, iObj);
94 pObj = Gia_ManObj(
p, iObj );
95 Vec_BitWriteEntry( vPath, iObj, 1 );
96 if ( Gia_ObjIsCi(pObj) )
99 int iBox = pManTime ?
Tim_ManBoxForCi( pManTime, Gia_ObjCioId(pObj) ) : -1;
104 for ( k = 0; k < nBoxInputs; k++ )
107 int iDriver = Gia_ObjFaninId0p(
p, pCo );
108 if ( (pLevels[iDriver]+Slack >= LevelFan-1) && iDriver )
109 Sbc_ManCriticalPath_rec(
p, pLevels, iDriver, pLevels[iDriver], vPath, Abc_MaxInt(0, pLevels[iDriver]+Slack-(LevelFan-1)) );
114 assert( Gia_ObjIsAnd(pObj) );
116 if ( pLevels[iFan]+Slack >= LevelFan-1 )
121 int * pLevels = NULL, k, iDriver, Slack = 1;
123 Vec_Bit_t * vPath = Vec_BitStart( Gia_ManObjNum(
p) );
125 pLevels = Vec_IntArray(
p->vLevels );
128 if ( (pLevels[iDriver] == nLevels) && iDriver )
150 Vec_Bit_t * vPath = Vec_BitStart( Gia_ManObjNum(
p) );
151 int i, k, iFan, nLevels, * pLevels;
152 int nLuts = 0, nNodes = 0, nEdges = 0, nEdgesAll = 0;
153 if ( !Gia_ManHasMapping(
p) )
155 printf(
"No mapping is available.\n" );
158 assert( Gia_ManHasMapping(
p) );
162 if ( pLevels[iFan] == nLevels )
163 Vec_BitWriteEntry( vPath, iFan, 1 );
168 if ( !Vec_BitEntry(vPath, i) )
173 if ( pLevels[iFan] +1 < pLevels[i] )
175 assert( pLevels[iFan] + 1 == pLevels[i] );
176 Vec_BitWriteEntry( vPath, iFan, 1 );
183 nEdgesAll += (Vec_BitEntry(vPath, i) && Vec_BitEntry(vPath, iFan));
186 Vec_BitFree( vPath );
187 printf(
"AIG = %d. LUT = %d. Lev = %d. Path nodes = %d. Path edges = %d. (%d.)\n",
188 Gia_ManAndNum(
p), nLuts, nLevels, nNodes, nEdges, nEdgesAll );
#define ABC_NAMESPACE_IMPL_START
#define ABC_NAMESPACE_IMPL_END
#define Gia_ManForEachLutReverse(p, i)
int Gia_ManLutLevel(Gia_Man_t *p, int **ppLevels)
#define Gia_ManForEachCoDriverId(p, DriverId, i)
#define Gia_ManForEachLut(p, i)
struct Gia_Obj_t_ Gia_Obj_t
#define Gia_LutForEachFanin(p, i, iFan, k)
struct Gia_Man_t_ Gia_Man_t
int Gia_ManLutLevelWithBoxes(Gia_Man_t *p)
void Gia_ManIncrementTravId(Gia_Man_t *p)
void Sbc_ManAddInternalToPath(Gia_Man_t *p, Vec_Bit_t *vPath)
ABC_NAMESPACE_IMPL_START int Sbc_ManAddInternalToPath_rec(Gia_Man_t *p, int iObj, Vec_Bit_t *vPath)
DECLARATIONS ///.
void Sbc_ManCriticalPath_rec(Gia_Man_t *p, int *pLevels, int iObj, int LevelFan, Vec_Bit_t *vPath, int Slack)
void Sbc_ManDelayTrace(Gia_Man_t *p)
Vec_Bit_t * Sbc_ManCriticalPath(Gia_Man_t *p)
typedefABC_NAMESPACE_HEADER_START struct Tim_Man_t_ Tim_Man_t
INCLUDES ///.
int Tim_ManBoxForCi(Tim_Man_t *p, int iCo)
int Tim_ManBoxInputFirst(Tim_Man_t *p, int iBox)
int Tim_ManBoxInputNum(Tim_Man_t *p, int iBox)
typedefABC_NAMESPACE_HEADER_START struct Vec_Bit_t_ Vec_Bit_t
INCLUDES ///.