From 0353c1c1dce9b22d33bb785210ef784866174ace Mon Sep 17 00:00:00 2001 From: gatecat Date: Wed, 17 Jul 2024 15:38:38 +0200 Subject: [PATCH] ng_ultra: Expand bounding box further for left-edge IO Signed-off-by: gatecat --- himbaechel/uarch/ng-ultra/ng_ultra.cc | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/himbaechel/uarch/ng-ultra/ng_ultra.cc b/himbaechel/uarch/ng-ultra/ng_ultra.cc index ac987397..3c12a10d 100644 --- a/himbaechel/uarch/ng-ultra/ng_ultra.cc +++ b/himbaechel/uarch/ng-ultra/ng_ultra.cc @@ -700,10 +700,13 @@ BoundingBox NgUltraImpl::getRouteBoundingBox(WireId src, WireId dst) const tile_xy(ctx->chip_info, dst.tile, dx, dy); expand(dx, dy); // Two TILEs left and up, and one tile right and down - return {(x0 & 0xfffc) - 8, - (y0 & 0xfffc) - 8, - (x1 & 0xfffc) + 8, - (y1 & 0xfffc) + 8}; + int exp = 8; + if (x0 == 0 || y0==0 || y1==52*4 || x1==96*4) + exp = 24; // more expansion around IO + return {(x0 & 0xfffc) - exp, + (y0 & 0xfffc) - exp, + (x1 & 0xfffc) + exp, + (y1 & 0xfffc) + exp}; } delay_t NgUltraImpl::estimateDelay(WireId src, WireId dst) const