ice40: Implement getRouteBoundingBox for router2
Signed-off-by: David Shah <dave@ds0.me>
This commit is contained in:
parent
7123209324
commit
ce144addb3
@ -1255,6 +1255,30 @@ void Arch::assignCellInfo(CellInfo *cell)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ArcBounds Arch::getRouteBoundingBox(WireId src, WireId dst) const
|
||||||
|
{
|
||||||
|
ArcBounds bb;
|
||||||
|
|
||||||
|
int src_x = chip_info->wire_data[src.index].x;
|
||||||
|
int src_y = chip_info->wire_data[src.index].y;
|
||||||
|
int dst_x = chip_info->wire_data[dst.index].x;
|
||||||
|
int dst_y = chip_info->wire_data[dst.index].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;
|
||||||
|
}
|
||||||
|
|
||||||
#ifdef WITH_HEAP
|
#ifdef WITH_HEAP
|
||||||
const std::string Arch::defaultPlacer = "heap";
|
const std::string Arch::defaultPlacer = "heap";
|
||||||
#else
|
#else
|
||||||
|
@ -826,6 +826,8 @@ struct Arch : BaseCtx
|
|||||||
uint32_t getDelayChecksum(delay_t v) const { return v; }
|
uint32_t getDelayChecksum(delay_t v) const { return v; }
|
||||||
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();
|
||||||
|
Loading…
Reference in New Issue
Block a user