router2: debugging
Signed-off-by: David Shah <dave@ds0.me>
This commit is contained in:
parent
17256c680a
commit
37543ad003
@ -609,9 +609,10 @@ class SAPlacer
|
||||
std::vector<std::pair<CellInfo *, BelId>> dest_bels;
|
||||
double delta = 0;
|
||||
moveChange.reset(this);
|
||||
#if 0
|
||||
if (ctx->debug)
|
||||
log_info("finding cells for chain swap %s\n", cell->name.c_str(ctx));
|
||||
|
||||
#endif
|
||||
Loc baseLoc = ctx->getBelLocation(cell->bel);
|
||||
discover_chain(baseLoc, cell, cell_rel);
|
||||
Loc newBaseLoc = ctx->getBelLocation(newBase);
|
||||
@ -634,8 +635,10 @@ class SAPlacer
|
||||
return false;
|
||||
dest_bels.emplace_back(std::make_pair(cr.first, targetBel));
|
||||
}
|
||||
#if 0
|
||||
if (ctx->debug)
|
||||
log_info("trying chain swap %s\n", cell->name.c_str(ctx));
|
||||
#endif
|
||||
// <cell, oldBel>
|
||||
for (const auto &db : dest_bels) {
|
||||
BelId oldBel = swap_cell_bels(db.first, db.second);
|
||||
@ -661,8 +664,10 @@ class SAPlacer
|
||||
// SA acceptance criterea
|
||||
if (delta < 0 || (temp > 1e-9 && (ctx->rng() / float(0x3fffffff)) <= std::exp(-delta / temp))) {
|
||||
n_accept++;
|
||||
#if 0
|
||||
if (ctx->debug)
|
||||
log_info("accepted chain swap %s\n", cell->name.c_str(ctx));
|
||||
#endif
|
||||
} else {
|
||||
goto swap_fail;
|
||||
}
|
||||
|
@ -521,6 +521,9 @@ struct Router2
|
||||
int toexplore = 25000 * std::max(1, (ad.bb.x1 - ad.bb.x0) + (ad.bb.y1 - ad.bb.y0));
|
||||
int iter = 0;
|
||||
int explored = 1;
|
||||
bool debug_arc = /*usr.cell->type.str(ctx).find("RAMB") != std::string::npos && (usr.port ==
|
||||
ctx->id("ADDRATIEHIGH0") || usr.port == ctx->id("ADDRARDADDRL0"))*/
|
||||
false;
|
||||
while (!t.queue.empty() && (!is_bb || iter < toexplore)) {
|
||||
auto curr = t.queue.top();
|
||||
t.queue.pop();
|
||||
@ -546,8 +549,9 @@ struct Router2
|
||||
#endif
|
||||
// Evaluate score of next wire
|
||||
WireId next = ctx->getPipDstWire(dh);
|
||||
#if 0
|
||||
ROUTE_LOG_DBG(" src wire %s\n", ctx->nameOfWire(next));
|
||||
#if 1
|
||||
if (debug_arc)
|
||||
ROUTE_LOG_DBG(" src wire %s\n", ctx->nameOfWire(next));
|
||||
#endif
|
||||
auto &nwd = wires.at(next);
|
||||
if (nwd.unavailable)
|
||||
|
Loading…
Reference in New Issue
Block a user