This commit is contained in:
Miodrag Milanovic 2025-09-12 14:14:57 +02:00
parent c66e422dd0
commit 485def603a
1 changed files with 4 additions and 5 deletions

View File

@ -33,10 +33,10 @@ namespace {
struct QueuedWire
{
explicit QueuedWire(WireId wire, float delay = 0.0) : wire{wire}, delay{delay} {};
explicit QueuedWire(WireId wire, int delay = 0) : wire{wire}, delay{delay} {};
WireId wire;
float delay;
int 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(" (%.3fns)\n", curr.delay);
log_info(" (%d)\n", curr.delay);
dest = curr.wire;
break;
}
@ -202,8 +202,7 @@ void GateMateImpl::route_clock()
//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
auto delay = ctx->getDelayNS(ctx->getDelayEpsilon());
visit.push(QueuedWire(src, curr.delay + delay));
visit.push(QueuedWire(src, curr.delay + 1));
}
}
if (dest == WireId()) {