Index: trunk/src/plugins/rt_topo/crbs.h =================================================================== --- trunk/src/plugins/rt_topo/crbs.h (revision 1481) +++ trunk/src/plugins/rt_topo/crbs.h (revision 1482) @@ -53,7 +53,6 @@ gdl_list_t twonets; /* of crbs_2net_t */ htad_t addrs; - unsigned disable_concave:1; /* when set to 1, do an all-convex routing (and possibly virtual-concave) */ unsigned disable_vconcave:1; /* when set to 1, so not do the virtual-concave optimization */ unsigned enable_mid_virt:1; /* when set to 1, insert a virtual point in between any two real points in the original cdt; this allows convex-only routing to emulate concave in corridors */ Index: trunk/src/plugins/rt_topo/crbs_route.c =================================================================== --- trunk/src/plugins/rt_topo/crbs_route.c (revision 1481) +++ trunk/src/plugins/rt_topo/crbs_route.c (revision 1482) @@ -55,7 +55,7 @@ dist = crbs_dist_heur(crbs->target->pt->x, crbs->target->pt->y, tx, ty); /* prefer concave over convex assuming the puller will get it shorter */ - if (((from->type & 0x0F) == ADDR_ARC_VCONCAVE) || ((from->type & 0x0F) == ADDR_ARC_CONCAVE)) + if ((from->type & 0x0F) == ADDR_ARC_VCONCAVE) dist = dist * 2 / 3; return dist; @@ -73,7 +73,6 @@ switch(from->type & 0x0F) { case ADDR_ARC_VCONCAVE: - case ADDR_ARC_CONCAVE: tune = 2.0/3.0; /* prefer concave over convex assuming the puller will get it shorter */ case ADDR_ARC_CONVEX: ex = from->pt->x + cos(from->new_sa + from->new_da) * from->new_r; @@ -91,7 +90,6 @@ switch(to->type & 0x0F) { case ADDR_ARC_VCONCAVE: - case ADDR_ARC_CONCAVE: tune = tune * (2.0/3.0); case ADDR_ARC_CONVEX: to_dir = to->new_adir; @@ -118,7 +116,6 @@ 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; @@ -259,7 +256,7 @@ crbs_grbs_draw(crbs, tmp); } - if (((froma->type & 0x0f) == ADDR_ARC_CONVEX) || ((froma->type & 0x0f) == ADDR_ARC_CONCAVE)) { + if ((froma->type & 0x0f) == ADDR_ARC_CONVEX) { if (fabs(froma->obj.arc->new_da) > M_PI) { /* printf(" INVALID arc (too long): %f at P%ld\n", froma->obj.arc->new_da, froma->obj.arc->parent_pt == NULL ? -1 : froma->obj.arc->parent_pt->uid);*/ grbs_path_cleanup_addr(&crbs->grbs, toa); @@ -268,15 +265,6 @@ } } - if ((froma->type & 0x0f) == ADDR_ARC_CONCAVE) { - if (fabs(froma->obj.arc->new_da) < 0.01) { -/* printf(" INVALID arc (too short): %f at P%ld\n", froma->obj.arc->new_da, froma->obj.arc->parent_pt == NULL ? -1 : froma->obj.arc->parent_pt->uid);*/ - grbs_path_cleanup_addr(&crbs->grbs, toa); - grbs_path_cleanup_addr(&crbs->grbs, froma); - return NULL; - } - } - if ((adir == GRBS_ADIR_CONVEX_CCW) || (adir == GRBS_ADIR_CONVEX_CW)) { if (crbs_is_spiral(ctx, curr, toa)) { printf(" INVALID spiral: P%ld\n", froma->obj.arc->parent_pt == NULL ? -1 : froma->obj.arc->parent_pt->uid); @@ -342,7 +330,6 @@ switch(curr->type & 0x0F) { case ADDR_ARC_CONVEX: from_type = (curr->new_adir > 0) ? "convex cw" : "convex ccw"; break; - case ADDR_ARC_CONCAVE: from_type = (curr->new_adir > 0) ? "concave cw" : "concave ccw"; break; case ADDR_ARC_VCONCAVE: from_type = "vconcave"; break; case ADDR_POINT: from_type = "incident"; break; default: from_type = "UNKNOWN"; break; @@ -376,17 +363,13 @@ a->grbs_idx = 3; } - if (crbs->disable_concave) { - if (a->grbs_idx < 2) - a->grbs_idx = 2; - } +#warning TODO: start indexing from 0, tune the above if() as well + if (a->grbs_idx < 2) + a->grbs_idx = 2; - /* prefer concave over convex; order matters when reaching target: first valid solution will stop the search */ switch(a->grbs_idx) { - case 0: if (crbs_trace_ast) printf(" concave ccw"); next = crbs_next_hop(ctx, curr, pt, GRBS_ADIR_CONCAVE_CCW); break; - case 1: if (crbs_trace_ast) printf(" concave cw"); next = crbs_next_hop(ctx, curr, pt, GRBS_ADIR_CONCAVE_CW); break; case 2: if (crbs_trace_ast) printf(" vconcave"); next = crbs_next_hop(ctx, curr, pt, GRBS_ADIR_VCONCAVE); break; case 3: if (crbs_trace_ast) printf(" convex ccw"); next = crbs_next_hop(ctx, curr, pt, GRBS_ADIR_CONVEX_CCW); break; case 4: if (crbs_trace_ast) printf(" convex cw"); next = crbs_next_hop(ctx, curr, pt, GRBS_ADIR_CONVEX_CW); break; @@ -576,8 +559,6 @@ case GRBS_ADIR_INC: printf(" to P%ld", da->pt->uid); break; case GRBS_ADIR_CONVEX_CCW: printf(" ccw P%ld", da->pt->uid); break; case GRBS_ADIR_CONVEX_CW: printf(" cw P%ld", da->pt->uid); break; - case GRBS_ADIR_CONCAVE_CCW: printf(" concave ccw P%ld", da->pt->uid); break; - case GRBS_ADIR_CONCAVE_CW: printf(" concave cw P%ld", da->pt->uid); break; case GRBS_ADIR_VCONCAVE: printf(" vconcave P%ld", da->pt->uid); break; } na = grbs_path_next(&crbs->grbs, crbs->routing_tn, pa, da->pt, da->user_long); @@ -740,7 +721,6 @@ memset(&crbs, 0, sizeof(crbs_t)); crbs.disable_vconcave = 0; - crbs.disable_concave = 1; crbs.enable_mid_virt = rt_topo_cfg.mid_virt; crbs_init(&crbs, ctx);