From 485def603a3c1266e90591603b3d6b4f1493a9ea Mon Sep 17 00:00:00 2001 From: Miodrag Milanovic Date: Fri, 12 Sep 2025 14:14:57 +0200 Subject: [PATCH] optimize --- himbaechel/uarch/gatemate/route_clock.cc | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/himbaechel/uarch/gatemate/route_clock.cc b/himbaechel/uarch/gatemate/route_clock.cc index 9d432b4a..a19ebc5e 100644 --- a/himbaechel/uarch/gatemate/route_clock.cc +++ b/himbaechel/uarch/gatemate/route_clock.cc @@ -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()) {