简介
It uses cache-aware simulated annealing (SA) to minimize the routing cost of a chip design.
1.热点分析
1.1热点函数
1.2热点循环
格式说明: 热点循环-(函数执行次数-各层执行总次数)
执行百分比:热点循环占本函数执行比例
函数: netlist_elem::swap_cost
ns.L1(180000000-778566410)
执行百分比:
ns.L1(180000000-778588380)
执行百分比:
1.3 热点代码
/* 函数 netlist_elem::swap_cost */
// ns.L1
for (int i = 0; i< fanin.size(); ++i)
{
location_t* fanin_loc = fanin[i]->present_loc.Get();
no_swap += fabs(old_loc->x - fanin_loc->x);
no_swap += fabs(old_loc->y - fanin_loc->y);
yes_swap += fabs(new_loc->x - fanin_loc->x);
yes_swap += fabs(new_loc->y - fanin_loc->y);
}
// ns.L2
for (int i = 0; i< fanout.size(); ++i)
{
location_t* fanout_loc = fanout[i]->present_loc.Get();
no_swap += fabs(old_loc->x - fanout_loc->x);
no_swap += fabs(old_loc->y - fanout_loc->y);
yes_swap += fabs(new_loc->x - fanout_loc->x);
yes_swap += fabs(new_loc->y - fanout_loc->y);
}
/*
AtomicPtr(T *x)
{
assert(x != ATOMIC_NULL);
p = x;
}
AtomicPtr(const AtomicPtr<T> &X)
{
p = X.Get();
}
inline T *Get() const
{
T *val;
#ifdef ENABLE_THREADS
do {
val = (T *)atomic_load_acq_ptr((ATOMIC_TYPE *)&p);
} while(val == ATOMIC_NULL);
#else
val = p;
assert(val != ATOMIC_NULL);
#endif //ENABLE_THREADS
return val;
}
2.功能分析
2.1数据标签
标签 | 数据 | 注释 |
---|
说明:s,v,m,t(全局数据)ns.(局部数据)
2.2数据流分析
函数 netlist_elem::swap_cost
ns.L1.1(17行)
P1: ns., ns.v ->ns.
3.加速分析