Index: plugins/rt_topo/crbs_route.c =================================================================== --- plugins/rt_topo/crbs_route.c (revision 1457) +++ plugins/rt_topo/crbs_route.c (revision 1458) @@ -62,8 +62,10 @@ static long crbs_ast_cost(usrch_a_star_t *ctx, void *from_, void *to_) { -/* crbs_t *crbs = ctx->user_data;*/ + crbs_t *crbs = ctx->user_data; grbs_detached_addr_t *from = from_, *to = to_; + crbs_2net_t *ctn; + crbs_point_t *cto; double ex, ey, tx, ty, tune = 1; long cost; int from_dir = 0, to_dir = 0; @@ -107,6 +109,24 @@ if ((from_dir != 0) && (to_dir != 0) && (from_dir != to_dir)) cost *= 1.01; + + /* If we are about to go around a point of our own net, give a penalty for + anything but vconcave; this helps avoiding a dogleg around square pin + corner before aiming at the center */ + cto = to->pt->user_data; + ctn = crbs->routing_tn->user_data; + if (cto->net == ctn->net) { + switch(to->type & 0x0F) { + case ADDR_ARC_CONCAVE: + case ADDR_ARC_CONVEX: + cost *= 3; + break; + case ADDR_ARC_VCONCAVE: + case ADDR_POINT: + break; + } + } + return cost; }