Index: src/plugins/rt_topo/crbs_route.c =================================================================== --- src/plugins/rt_topo/crbs_route.c (revision 1443) +++ src/plugins/rt_topo/crbs_route.c (revision 1444) @@ -320,7 +320,6 @@ while(a->grbs_idx < 5) { if (crbs_trace_ast) printf(" try from %s P%ld to P%ld", from_type, curr->pt->uid, pt->gpt->uid); - if (crbs->disable_vconcave) { if (a->grbs_idx < 3) a->grbs_idx = 3; @@ -430,7 +429,7 @@ usrch_a_star_t ast = {0}; usrch_a_star_node_t *it; grbs_detached_addr_t addr_tmp[2]; - grbs_detached_addr_t *first, *da; + grbs_detached_addr_t *first, *da, *last; grbs_addr_t *na, *pa, *firsta, *lasta; crbs_2net_t *tn; int res = -1; @@ -451,6 +450,26 @@ htad_clear(&crbs->addrs); } + crbs->first = first = addr_new_point(crbs, ctn->cstart, &addr_tmp[0]); + crbs->target = ast.target = last = addr_new_point(crbs, ctn->cend, &addr_tmp[1]); + +#warning TODO: per net wire thickness + if (ctn->gtn == NULL) { + crbs->routing_tn = ctn->gtn = grbs_2net_new(&crbs->grbs, rt_topo_cfg.wire_thick, rt_topo_cfg.wire_clr); + crbs->routing_tn->user_data = ctn; + } + else + crbs->routing_tn = ctn->gtn; + + /* check if it is possible to start and end the twonet as incident line in + start and end point */ + if ((grbs_is_target_pt_routable(&crbs->grbs, crbs->routing_tn, first->pt) == 0) || (grbs_is_target_pt_routable(&crbs->grbs, crbs->routing_tn, last->pt) == 0)) { + printf(" Can not route from start or to end because of incident line end cap collision\n"); + res = -1; + goto err; + } + + ast.heuristic = crbs_ast_heuristic; ast.cost = crbs_ast_cost; ast.neighbor_pre = crbs_ast_neighbor_pre; @@ -461,17 +480,6 @@ cnt_grbs++; - crbs->first = first = addr_new_point(crbs, ctn->cstart, &addr_tmp[0]); - crbs->target = ast.target = addr_new_point(crbs, ctn->cend, &addr_tmp[1]); - -#warning TODO: per net wire thickness - if (ctn->gtn == NULL) { - crbs->routing_tn = ctn->gtn = grbs_2net_new(&crbs->grbs, rt_topo_cfg.wire_thick, rt_topo_cfg.wire_clr); - crbs->routing_tn->user_data = ctn; - } - else - crbs->routing_tn = ctn->gtn; - printf(" route_net: from P%ld to P%ld (step 3_GRBS_routed_%d)\n", ((crbs_point_t *)(ctn->cstart->data))->gpt->uid, ((crbs_point_t *)(ctn->cend->data))->gpt->uid,