Revert "Do not use actual pip delay, determine best by number of passed pips"

This reverts commit c66e422dd0.

We want to guarantee minimum clock skew, so we need pip delay.
This commit is contained in:
Lofty 2025-09-16 09:36:35 +01:00
parent 80255e3611
commit efff6f90f3
1 changed files with 6 additions and 7 deletions

View File

@ -33,10 +33,10 @@ namespace {
struct QueuedWire
{
explicit QueuedWire(WireId wire, int delay = 0) : wire{wire}, delay{delay} {};
explicit QueuedWire(WireId wire, delay_t delay = 0) : wire{wire}, delay{delay} {};
WireId wire;
int delay;
delay_t delay;
bool operator>(const QueuedWire &rhs) const { return this->delay > rhs.delay; }
};
@ -155,7 +155,7 @@ void GateMateImpl::route_clock()
visit.pop();
if (curr.wire == ctx->getNetinfoSourceWire(clk_net)) {
if (ctx->debug)
log_info(" (%d)\n", curr.delay);
log_info(" (%.3fns)\n", ctx->getDelayNS(curr.delay));
dest = curr.wire;
break;
}
@ -199,10 +199,9 @@ void GateMateImpl::route_clock()
continue;
}
backtrace[src] = uh;
//auto delay = ctx->getDelayNS(ctx->getPipDelay(uh).maxDelay() + ctx->getWireDelay(src).maxDelay() +
// ctx->getDelayEpsilon());
// Do not use actual delay, enough is to know number of passed pips
visit.push(QueuedWire(src, curr.delay + 1));
auto delay = ctx->getPipDelay(uh).maxDelay() + ctx->getWireDelay(src).maxDelay() +
ctx->getDelayEpsilon();
visit.push(QueuedWire(src, curr.delay + delay));
}
}
if (dest == WireId()) {