Add getWireDelay API
Signed-off-by: Clifford Wolf <clifford@clifford.at>
This commit is contained in:
parent
09a68affa3
commit
c556242976
@ -148,6 +148,8 @@ struct Router
|
|||||||
bool foundRipupNet = false;
|
bool foundRipupNet = false;
|
||||||
thisVisitCnt++;
|
thisVisitCnt++;
|
||||||
|
|
||||||
|
next_delay += ctx->getWireDelay(next_wire).avgDelay();
|
||||||
|
|
||||||
if (!ctx->checkWireAvail(next_wire)) {
|
if (!ctx->checkWireAvail(next_wire)) {
|
||||||
if (!ripup)
|
if (!ripup)
|
||||||
continue;
|
continue;
|
||||||
@ -226,7 +228,7 @@ struct Router
|
|||||||
: ctx(ctx), scores(scores), ripup(ripup), ripup_penalty(ripup_penalty)
|
: ctx(ctx), scores(scores), ripup(ripup), ripup_penalty(ripup_penalty)
|
||||||
{
|
{
|
||||||
std::unordered_map<WireId, delay_t> src_wires;
|
std::unordered_map<WireId, delay_t> src_wires;
|
||||||
src_wires[src_wire] = 0;
|
src_wires[src_wire] = ctx->getWireDelay(src_wire).avgDelay();
|
||||||
route(src_wires, dst_wire);
|
route(src_wires, dst_wire);
|
||||||
routedOkay = visited.count(dst_wire);
|
routedOkay = visited.count(dst_wire);
|
||||||
|
|
||||||
@ -284,7 +286,7 @@ struct Router
|
|||||||
log(" Source wire: %s\n", ctx->getWireName(src_wire).c_str(ctx));
|
log(" Source wire: %s\n", ctx->getWireName(src_wire).c_str(ctx));
|
||||||
|
|
||||||
std::unordered_map<WireId, delay_t> src_wires;
|
std::unordered_map<WireId, delay_t> src_wires;
|
||||||
src_wires[src_wire] = 0;
|
src_wires[src_wire] = ctx->getWireDelay(src_wire).avgDelay();
|
||||||
|
|
||||||
ripup_net(ctx, net_name);
|
ripup_net(ctx, net_name);
|
||||||
ctx->bindWire(src_wire, net_name, STRENGTH_WEAK);
|
ctx->bindWire(src_wire, net_name, STRENGTH_WEAK);
|
||||||
|
@ -578,6 +578,12 @@ struct Arch : BaseCtx
|
|||||||
return wire_to_net.at(wire);
|
return wire_to_net.at(wire);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
DelayInfo getWireDelay(WireId wire) const
|
||||||
|
{
|
||||||
|
DelayInfo delay;
|
||||||
|
return delay;
|
||||||
|
}
|
||||||
|
|
||||||
WireRange getWires() const
|
WireRange getWires() const
|
||||||
{
|
{
|
||||||
WireRange range;
|
WireRange range;
|
||||||
|
@ -157,6 +157,7 @@ struct Arch : BaseCtx
|
|||||||
bool checkWireAvail(WireId wire) const;
|
bool checkWireAvail(WireId wire) const;
|
||||||
IdString getBoundWireNet(WireId wire) const;
|
IdString getBoundWireNet(WireId wire) const;
|
||||||
IdString getConflictingWireNet(WireId wire) const;
|
IdString getConflictingWireNet(WireId wire) const;
|
||||||
|
DelayInfo getWireDelay(WireId wire) const { return DelayInfo(); }
|
||||||
const std::vector<WireId> &getWires() const;
|
const std::vector<WireId> &getWires() const;
|
||||||
|
|
||||||
PipId getPipByName(IdString name) const;
|
PipId getPipByName(IdString name) const;
|
||||||
|
@ -548,6 +548,12 @@ struct Arch : BaseCtx
|
|||||||
return wire_to_net[wire.index];
|
return wire_to_net[wire.index];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
DelayInfo getWireDelay(WireId wire) const
|
||||||
|
{
|
||||||
|
DelayInfo delay;
|
||||||
|
return delay;
|
||||||
|
}
|
||||||
|
|
||||||
WireRange getWires() const
|
WireRange getWires() const
|
||||||
{
|
{
|
||||||
WireRange range;
|
WireRange range;
|
||||||
|
Loading…
Reference in New Issue
Block a user