Update expandBoundingBox for NG-Ultra

This commit is contained in:
Miodrag Milanovic 2024-11-27 09:53:25 +01:00
parent b4ba2af423
commit 83b464b59c
2 changed files with 13 additions and 0 deletions

View File

@ -719,6 +719,17 @@ BoundingBox NgUltraImpl::getRouteBoundingBox(WireId src, WireId dst) const
(y1 & 0xfffc) + 8}; // current and row bellow
}
void NgUltraImpl::expandBoundingBox(BoundingBox &bb) const
{
// Updated numbers for NG-ULTRA only
// x0 and y0 substract 1 TILE
// x1 and y1 adds 1 TILE (and of one added)
bb.x0 = std::max((bb.x0 & 0xfffc) - 4, 0);
bb.y0 = std::max((bb.y0 & 0xfffc) - 4, 0);
bb.x1 = std::min((bb.x1 & 0xfffc) + 8, ctx->getGridDimX());
bb.y1 = std::min((bb.y1 & 0xfffc) + 8, ctx->getGridDimY());
}
delay_t NgUltraImpl::estimateDelay(WireId src, WireId dst) const
{
int sx, sy, dx, dy;

View File

@ -58,6 +58,8 @@ struct NgUltraImpl : HimbaechelAPI
bool checkPipAvail(PipId pip) const override { return blocked_pips.count(pip)==0; }
bool checkPipAvailForNet(PipId pip, const NetInfo *net) const override { return checkPipAvail(pip); };
void expandBoundingBox(BoundingBox &bb) const override;
void drawBel(std::vector<GraphicElement> &g, GraphicElement::style_t style, IdString bel_type, Loc loc) override;
public:
int tile_lobe(int tile) const;