MACRO DEFINITIONS ///.
214{
221 unsigned * puTruth;
222 int i, k, RetValue, nNodesOld, nFanins, nFaninsMax;
223 abctime clk, clkTotal = Abc_Clock();
224
225
228 p->nTotalNodes = Abc_NtkNodeNum(pNtk);
230 if ( nFaninsMax > 8 )
231 nFaninsMax = 8;
232
233
235
236
238 {
239 fprintf( stdout, "Converting to BDD has failed.\n" );
241 return 0;
242 }
243 assert( Abc_NtkHasAig(pNtk) );
244
245
248
249
250 nNodesOld = Abc_NtkObjNumMax(pNtk);
253 {
254 Extra_ProgressBarUpdate( pProgress, i, NULL );
255 if ( !Abc_ObjIsNode(pObj) )
256 continue;
257 if ( Abc_ObjFaninNum(pObj) > 8 )
258 continue;
259 if ( pObj->
Id > nNodesOld )
260 break;
261
262
263clk = Abc_Clock();
264 RetValue =
Res_WinCompute( pObj,
p->pPars->nWindow/10,
p->pPars->nWindow%10,
p->pWin );
265p->timeWin += Abc_Clock() - clk;
266 if ( !RetValue )
267 continue;
269
270 if (
p->pPars->fVeryVerbose )
271 {
272 printf(
"%5d (lev=%2d) : ", pObj->
Id, pObj->
Level );
273 printf( "Win = %3d/%3d/%4d/%3d ",
274 Vec_PtrSize(
p->pWin->vLeaves),
275 Vec_PtrSize(
p->pWin->vBranches),
276 Vec_PtrSize(
p->pWin->vNodes),
277 Vec_PtrSize(
p->pWin->vRoots) );
278 }
279
280
281clk = Abc_Clock();
283p->timeDiv += Abc_Clock() - clk;
284
286 p->nWinNodes += Vec_PtrSize(
p->pWin->vNodes);
287 p->nDivNodes += Vec_PtrSize(
p->pWin->vDivs);
288
289 if (
p->pPars->fVeryVerbose )
290 {
291 printf(
"D = %3d ", Vec_PtrSize(
p->pWin->vDivs) );
292 printf(
"D+ = %3d ",
p->pWin->nDivsPlus );
293 }
294
295
296clk = Abc_Clock();
299p->timeAig += Abc_Clock() - clk;
300
301 if (
p->pPars->fVeryVerbose )
302 {
303 printf(
"AIG = %4d ", Abc_NtkNodeNum(
p->pAig) );
304 printf( "\n" );
305 }
306
307
308clk = Abc_Clock();
310p->timeSim += Abc_Clock() - clk;
311 if ( !RetValue )
312 {
314 continue;
315 }
316
317
318 if (
p->pSim->fConst0 ||
p->pSim->fConst1 )
319 {
321
323 vFanins = Vec_VecEntry(
p->vResubsW, 0 );
324 Vec_PtrClear( vFanins );
326 continue;
327 }
328
329
330
331
332clk = Abc_Clock();
333 if (
p->pPars->fArea )
335 else
337p->timeCand += Abc_Clock() - clk;
338 p->nCandSets += RetValue;
339 if ( RetValue == 0 )
340 continue;
341
342
343
345
346
348 {
349 if ( Vec_PtrSize(vFanins) == 0 )
350 break;
351
352
353clk = Abc_Clock();
356 if (
p->pCnf == NULL )
357 {
358p->timeSatSat += Abc_Clock() - clk;
359
360
361 continue;
362 }
363p->timeSatUnsat += Abc_Clock() - clk;
364
365
367
368
369
370
371
372
373
374
375clk = Abc_Clock();
377p->timeInt += Abc_Clock() - clk;
378 if ( nFanins != Vec_PtrSize(vFanins) - 2 )
379 continue;
381
382
383
385
386
389
390
391clk = Abc_Clock();
393p->timeUpd += Abc_Clock() - clk;
394 break;
395 }
396
397 }
400
401p->timeSatSim +=
p->pSim->timeSat;
402p->timeSatTotal =
p->timeSatSat +
p->timeSatUnsat +
p->timeSatSim;
403
405 p->nTotalNodes2 = Abc_NtkNodeNum(pNtk);
406
407
408p->timeTotal = Abc_Clock() - clkTotal;
410
412
414 {
415 fprintf( stdout, "Abc_NtkResynthesize(): Network check has failed.\n" );
416 return 0;
417 }
418 return 1;
419}
ABC_DLL int Abc_NtkSweep(Abc_Ntk_t *pNtk, int fVerbose)
struct Abc_Obj_t_ Abc_Obj_t
ABC_DLL int Abc_NtkGetFaninMax(Abc_Ntk_t *pNtk)
ABC_DLL int Abc_ObjRequiredLevel(Abc_Obj_t *pObj)
ABC_DLL int Abc_NtkCheck(Abc_Ntk_t *pNtk)
FUNCTION DEFINITIONS ///.
#define Abc_NtkForEachObj(pNtk, pObj, i)
ITERATORS ///.
ABC_DLL void Abc_NtkStopReverseLevels(Abc_Ntk_t *pNtk)
ABC_DLL int Abc_NtkLevel(Abc_Ntk_t *pNtk)
ABC_DLL void Abc_NtkStartReverseLevels(Abc_Ntk_t *pNtk, int nMaxLevelIncrease)
ABC_DLL int Abc_NtkToAig(Abc_Ntk_t *pNtk)
ABC_DLL void Abc_NtkDelete(Abc_Ntk_t *pNtk)
ABC_DLL int Abc_NtkGetTotalFanins(Abc_Ntk_t *pNtk)
ABC_NAMESPACE_IMPL_START typedef char ProgressBar
typedefABC_NAMESPACE_HEADER_START struct Hop_Man_t_ Hop_Man_t
INCLUDES ///.
struct Hop_Obj_t_ Hop_Obj_t
struct Kit_Graph_t_ Kit_Graph_t
void Kit_GraphFree(Kit_Graph_t *pGraph)
Kit_Graph_t * Kit_TruthToGraph(unsigned *pTruth, int nVars, Vec_Int_t *vMemory)
typedefABC_NAMESPACE_IMPL_START struct Res_Man_t_ Res_Man_t
DECLARATIONS ///.
void Res_ManFree(Res_Man_t *p)
Hop_Obj_t * Kit_GraphToHop(Hop_Man_t *pMan, Kit_Graph_t *pGraph)
Res_Man_t * Res_ManAlloc(Res_Par_t *pPars)
FUNCTION DEFINITIONS ///.
void Res_UpdateNetwork(Abc_Obj_t *pObj, Vec_Ptr_t *vFanins, Hop_Obj_t *pFunc, Vec_Vec_t *vLevels)
void Res_WinDivisors(Res_Win_t *p, int nLevDivMax)
FUNCTION DEFINITIONS ///.
int Res_FilterCandidates(Res_Win_t *pWin, Abc_Ntk_t *pAig, Res_Sim_t *pSim, Vec_Vec_t *vResubs, Vec_Vec_t *vResubsW, int nFaninsMax, int fArea)
FUNCTION DEFINITIONS ///.
int Res_SimPrepare(Res_Sim_t *p, Abc_Ntk_t *pAig, int nTruePis, int fVerbose)
void * Res_SatProveUnsat(Abc_Ntk_t *pAig, Vec_Ptr_t *vFanins)
FUNCTION DEFINITIONS ///.
int Res_WinIsTrivial(Res_Win_t *p)
Abc_Ntk_t * Res_WndStrash(Res_Win_t *p)
FUNCTION DEFINITIONS ///.
int Res_WinCompute(Abc_Obj_t *pNode, int nWinTfiMax, int nWinTfoMax, Res_Win_t *p)
int Int_ManInterpolate(Int_Man_t *p, Sto_Man_t *pCnf, int fVerbose, unsigned **ppResult)
void Sto_ManFree(Sto_Man_t *p)
struct Sto_Man_t_ Sto_Man_t
typedefABC_NAMESPACE_HEADER_START struct Vec_Ptr_t_ Vec_Ptr_t
INCLUDES ///.
#define Vec_VecForEachLevel(vGlob, vVec, i)
MACRO DEFINITIONS ///.