generic: Implement getRouteBoundingBox
Signed-off-by: David Shah <dave@ds0.me>
This commit is contained in:
parent
2248e07b66
commit
a1c902dadc
@ -515,6 +515,30 @@ delay_t Arch::predictDelay(const NetInfo *net_info, const PortRef &sink) const
|
|||||||
|
|
||||||
bool Arch::getBudgetOverride(const NetInfo *net_info, const PortRef &sink, delay_t &budget) const { return false; }
|
bool Arch::getBudgetOverride(const NetInfo *net_info, const PortRef &sink, delay_t &budget) const { return false; }
|
||||||
|
|
||||||
|
ArcBounds Arch::getRouteBoundingBox(WireId src, WireId dst) const
|
||||||
|
{
|
||||||
|
ArcBounds bb;
|
||||||
|
|
||||||
|
int src_x = wires.at(src).x;
|
||||||
|
int src_y = wires.at(src).y;
|
||||||
|
int dst_x = wires.at(dst).x;
|
||||||
|
int dst_y = wires.at(dst).y;
|
||||||
|
|
||||||
|
bb.x0 = src_x;
|
||||||
|
bb.y0 = src_y;
|
||||||
|
bb.x1 = src_x;
|
||||||
|
bb.y1 = src_y;
|
||||||
|
|
||||||
|
auto extend = [&](int x, int y) {
|
||||||
|
bb.x0 = std::min(bb.x0, x);
|
||||||
|
bb.x1 = std::max(bb.x1, x);
|
||||||
|
bb.y0 = std::min(bb.y0, y);
|
||||||
|
bb.y1 = std::max(bb.y1, y);
|
||||||
|
};
|
||||||
|
extend(dst_x, dst_y);
|
||||||
|
return bb;
|
||||||
|
}
|
||||||
|
|
||||||
// ---------------------------------------------------------------
|
// ---------------------------------------------------------------
|
||||||
|
|
||||||
bool Arch::place()
|
bool Arch::place()
|
||||||
|
@ -267,6 +267,8 @@ struct Arch : BaseCtx
|
|||||||
uint32_t getDelayChecksum(delay_t v) const { return 0; }
|
uint32_t getDelayChecksum(delay_t v) const { return 0; }
|
||||||
bool getBudgetOverride(const NetInfo *net_info, const PortRef &sink, delay_t &budget) const;
|
bool getBudgetOverride(const NetInfo *net_info, const PortRef &sink, delay_t &budget) const;
|
||||||
|
|
||||||
|
ArcBounds getRouteBoundingBox(WireId src, WireId dst) const;
|
||||||
|
|
||||||
bool pack();
|
bool pack();
|
||||||
bool place();
|
bool place();
|
||||||
bool route();
|
bool route();
|
||||||
|
Loading…
Reference in New Issue
Block a user