Skip to content

Commit

Permalink
test: measure length of reconvergent paths
Browse files Browse the repository at this point in the history
  • Loading branch information
changmeng committed Dec 6, 2021
1 parent 9bd94f5 commit 2e26cca
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 3 deletions.
Binary file not shown.
1 change: 1 addition & 0 deletions SASIMI-VECBEE/src/sasimi.cc
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ void SASIMI_Manager_t::GreedySelection(Abc_Ntk_t * pOriNtk, string outPrefix)
break;
}
cout << "time = " << clock() - st << " us" << endl;
assert(0);
}

// clean up
Expand Down
24 changes: 21 additions & 3 deletions SASIMI-VECBEE/src/simulator.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1509,11 +1509,29 @@ void Simulator_t::FindOneCut(Abc_Obj_t * pPivot, int poId, set <Abc_Obj_t *> & c
flow[pPivot->Id] = 1.0;
oneCuts[pPivot->Id][poId] = nullptr;
FindOneCut_rec(Abc_ObjFanin0(pPo), pPivot, poId, cutNtkNodes, maxLevel);
// static int cnt;
// static int levelGap;
// static int nRec;
// cout << "one cut for pivot node " << Abc_ObjName(pPivot) << " on PO " << Abc_ObjName(Abc_NtkPo(pPivot->pNtk, poId)) << ":";
// if (oneCuts[pPivot->Id][poId] == nullptr)
// cout << "not found" << endl;
// else
// cout << Abc_ObjName(oneCuts[pPivot->Id][poId]) << endl;
// // cout << "not found" << endl;
// assert(0);
// else {
// auto oneCut = oneCuts[pPivot->Id][poId];
// cout << Abc_ObjName(oneCut) << endl;
// ++cnt;
// Abc_NtkLevel(pPivot->pNtk);
// int gap = oneCut->Level - pPivot->Level;
// if (gap <= 0) {
// assert(Abc_ObjIsPo(oneCut));
// gap = 1;
// }
// assert(gap > 0);
// levelGap += gap;
// if (gap > 1)
// ++nRec;
// cout << cnt << "," << levelGap << "," << nRec << "," << levelGap / static_cast <double> (cnt) << "," << nRec / static_cast <double> (cnt) << endl;
// }
}


Expand Down

0 comments on commit 2e26cca

Please sign in to comment.