pcb 4.1.1
An interactive printed circuit board layout editor.
|
Functions used to autoroute nets. More...
#include "global.h"
#include <assert.h>
#include <setjmp.h>
#include "data.h"
#include "macro.h"
#include "autoroute.h"
#include "box.h"
#include "create.h"
#include "draw.h"
#include "error.h"
#include "find.h"
#include "heap.h"
#include "rtree.h"
#include "misc.h"
#include "mtspace.h"
#include "mymem.h"
#include "polygon.h"
#include "rats.h"
#include "remove.h"
#include "thermal.h"
#include "undo.h"
#include "vector.h"
#include "pcb-printf.h"
#include "hid_draw.h"
Go to the source code of this file.
Data Structures | |
struct | routebox_list |
struct | routebox |
struct | routedata |
struct | edge_struct |
struct | routeone_state |
struct | rb_info |
struct | mincost_target_closure |
Some routines to find the minimum *cost* from a cost point to a target (any target). More... | |
struct | broken_boxes |
struct | E_result |
struct | break_info |
struct | foib_info |
struct | therm_info |
struct | routeone_via_site_state |
Vectors for via site candidates (see mtspace.h). More... | |
struct | routeone_status |
struct | routeall_status |
struct | fpin_info |
Defines | |
#define | NET_HEAP 1 |
#define | EXPENSIVE 3e28 |
#define | HALF_THICK(x) (((x)+1)/2) |
#define | BLOAT(style) ((style)->Keepaway + HALF_THICK((style)->Thick)) |
#define | CONFLICT_LEVEL(rb) |
#define | CONFLICT_PENALTY(rb) |
#define | _NORTH 1 |
#define | _EAST 2 |
#define | _SOUTH 4 |
#define | _WEST 8 |
#define | LIST_LOOP(init, which, x) |
#define | FOREACH_SUBNET(net, p) |
#define | END_FOREACH(net, p) |
#define | SWAP(t, f, s) do { t a=s; s=f; f=a; } while (0) |
Typedefs | |
typedef struct routebox_list | routebox_list |
typedef enum etype | etype |
typedef struct routebox | routebox_t |
typedef struct routedata | routedata_t |
typedef struct edge_struct | edge_t |
Enumerations | |
enum | conflict_t { NO_CONFLICT = 0, LO_CONFLICT = 1, HI_CONFLICT = 2 } |
enum | etype { PAD, PIN, VIA, VIA_SHADOW, LINE, OTHER, EXPANSION_AREA, PLANE, THERMAL } |
enum | boxlist { NET, SUBNET, ORIGINAL, DIFFERENT_NET } |
Functions | |
static direction_t | directionIncrement (direction_t dir) |
static routebox_t * | CreateExpansionArea (const BoxType *area, Cardinal group, routebox_t *parent, bool relax_edge_requirements, edge_t *src_edge) |
Area is the expansion area, on layer group 'group'. | |
static cost_t | edge_cost (const edge_t *e, const cost_t too_big) |
Cost function for an edge. | |
static void | best_path_candidate (struct routeone_state *s, edge_t *e, routebox_t *best_target) |
static BoxType | edge_to_box (const routebox_t *rb, direction_t expand_dir) |
Given an edge of a box, return a box containing exactly the points on that edge. | |
static void | add_or_destroy_edge (struct routeone_state *s, edge_t *e) |
static void | RD_DrawThermal (routedata_t *rd, Coord X, Coord Y, Cardinal group, Cardinal layer, routebox_t *subnet, bool is_bad) |
Route-tracing code: once we've got a path of expansion boxes, trace a line through them to actually create the connection. | |
static void | ResetSubnet (routebox_t *net) |
static int | __routebox_is_good (routebox_t *rb) |
static int | __edge_is_good (edge_t *e) |
int | no_planes (const BoxType *b, void *cl) |
static struct routebox_list * | __select_list (routebox_t *r, enum boxlist which) |
static void | InitLists (routebox_t *r) |
static void | MergeNets (routebox_t *a, routebox_t *b, enum boxlist which) |
static void | RemoveFromNet (routebox_t *a, enum boxlist which) |
static void | init_const_box (routebox_t *rb, Coord X1, Coord Y1, Coord X2, Coord Y2, Coord keepaway) |
static BoxType | shrink_routebox (const routebox_t *rb) |
static cost_t | box_area (const BoxType b) |
static CheapPointType | closest_point_in_routebox (const CheapPointType *from, const routebox_t *rb) |
static bool | point_in_shrunk_box (const routebox_t *box, Coord X, Coord Y) |
static routebox_t * | AddPin (PointerListType layergroupboxes[], PinType *pin, bool is_via, RouteStyleType *style) |
static routebox_t * | AddPad (PointerListType layergroupboxes[], ElementType *element, PadType *pad, RouteStyleType *style) |
static routebox_t * | AddLine (PointerListType layergroupboxes[], int layergroup, LineType *line, LineType *ptr, RouteStyleType *style) |
static routebox_t * | AddIrregularObstacle (PointerListType layergroupboxes[], Coord X1, Coord Y1, Coord X2, Coord Y2, Cardinal layergroup, void *parent, RouteStyleType *style) |
static routebox_t * | AddPolygon (PointerListType layergroupboxes[], Cardinal layer, PolygonType *polygon, RouteStyleType *style) |
static void | AddText (PointerListType layergroupboxes[], Cardinal layergroup, TextType *text, RouteStyleType *style) |
static routebox_t * | AddArc (PointerListType layergroupboxes[], Cardinal layergroup, ArcType *arc, RouteStyleType *style) |
static int | __found_one_on_lg (const BoxType *box, void *cl) |
static routebox_t * | FindRouteBoxOnLayerGroup (routedata_t *rd, Coord X, Coord Y, Cardinal layergroup) |
static routedata_t * | CreateRouteData () |
void | DestroyRouteData (routedata_t **rd) |
static void | RB_up_count (routebox_t *rb) |
Increment the reference count on a routebox. | |
static void | RB_down_count (routebox_t *rb) |
Decrement the reference count on a routebox, freeing if this box becomes unused. | |
static cost_t | cost_to_point_on_layer (const CheapPointType *p1, const CheapPointType *p2, Cardinal point_layer) |
static cost_t | cost_to_point (const CheapPointType *p1, Cardinal point_layer1, const CheapPointType *p2, Cardinal point_layer2) |
static cost_t | cost_to_layerless_box (const CheapPointType *p, Cardinal point_layer, const BoxType *b) |
Return the minimum *cost* from a point to a box on any layer. | |
bool | TargetPoint (CheapPointType *nextpoint, const routebox_t *target) |
Get to actual pins/pad target coordinates. | |
static cost_t | cost_to_routebox (const CheapPointType *p, Cardinal point_layer, const routebox_t *rb) |
Return the *minimum cost* from a point to a route box, including possible via costs if the route box is on a different layer. | |
static BoxType | bloat_routebox (routebox_t *rb) |
static routebox_t * | route_parent (routebox_t *rb) |
Return a "parent" of this edge which immediately precedes it in the route. | |
static vector_t * | path_conflicts (routebox_t *rb, routebox_t *conflictor, bool branch) |
static void | touch_conflicts (vector_t *conflicts, int touch) |
Touch everything (except fixed) on each net found in the conflicts vector. If the vector is different from the last one touched, untouch the last batch and touch the new one. Always call with touch=1 (except for recursive call). Call with NULL, 1 to clear the last batch touched. | |
static routebox_t * | nonhomeless_parent (routebox_t *rb) |
Return a "parent" of this edge which resides in a r-tree somewhere. | |
static int | __region_within_guess (const BoxType *region, void *cl) |
static int | __found_new_guess (const BoxType *box, void *cl) |
static routebox_t * | mincost_target_to_point (const CheapPointType *CostPoint, Cardinal CostPointLayer, rtree_t *targets, routebox_t *target_guess) |
| |
static edge_t * | CreateEdge (routebox_t *rb, Coord CostPointX, Coord CostPointY, cost_t cost_to_point, routebox_t *mincost_target_guess, direction_t expand_dir, rtree_t *targets) |
Create edge from field values. | |
static edge_t * | CreateEdge2 (routebox_t *rb, direction_t expand_dir, edge_t *previous_edge, rtree_t *targets, routebox_t *guess) |
Create edge, using previous edge to fill in defaults. | |
static edge_t * | CreateViaEdge (const BoxType *area, Cardinal group, routebox_t *parent, edge_t *previous_edge, conflict_t to_site_conflict, conflict_t through_site_conflict, rtree_t *targets) |
Create via edge, using previous edge to fill in defaults. | |
static edge_t * | CreateEdgeWithConflicts (const BoxType *interior_edge, routebox_t *container, edge_t *previous_edge, cost_t cost_penalty_to_box, rtree_t *targets) |
Create "interior" edge for routing with conflicts. | |
static void | KillEdge (void *edge) |
static void | DestroyEdge (edge_t **e) |
static struct broken_boxes | break_box_edge (const BoxType *original, direction_t which_edge, routebox_t *breaker) |
static int | share_edge (const BoxType *child, const BoxType *parent) |
static int | edge_intersect (const BoxType *child, const BoxType *parent) |
static int | __Expand_this_rect (const BoxType *box, void *cl) |
Test method for Expand(). | |
static bool | boink_box (routebox_t *rb, struct E_result *res, direction_t dir) |
struct E_result * | Expand (rtree_t *rtree, edge_t *e, const BoxType *box) |
Main Expand routine. | |
static int | blocker_to_heap (heap_t *heap, routebox_t *rb, BoxType *box, direction_t dir) |
blocker_to_heap puts the blockers into a heap so they can be retrieved in clockwise order. If a blocker is also a target, it gets put into the vector too. It returns 1 for any fixed blocker that is not part of this net and zero otherwise. | |
static routebox_t * | CreateBridge (const BoxType *area, routebox_t *parent, direction_t dir) |
This creates an EXPANSION_AREA to bridge small gaps or, (more commonly) create a supper-thin box to provide a home for an expansion edge. | |
void | moveable_edge (vector_t *result, const BoxType *box, direction_t dir, routebox_t *rb, routebox_t *blocker, edge_t *e, rtree_t *targets, struct routeone_state *s, rtree_t *tree, vector_t *area_vec) |
moveable_edge prepares the new search edges based on the starting box, direction and blocker if any. | |
static int | __GatherBlockers (const BoxType *box, void *cl) |
static BoxType | previous_edge (Coord last, direction_t i, const BoxType *b) |
Shrink the box to the last limit for the previous direction, i.e. if dir is SOUTH, then this means fixing up an EAST leftover edge, which would be the southern most edge for that example. | |
vector_t * | BreakManyEdges (struct routeone_state *s, rtree_t *targets, rtree_t *tree, vector_t *area_vec, struct E_result *ans, routebox_t *rb, edge_t *e) |
Break all the edges of the box that need breaking, handling targets as they are found, and putting any moveable edges in the return vector. | |
static routebox_t * | rb_source (routebox_t *rb) |
static int | foib_rect_in_reg (const BoxType *box, void *cl) |
static routebox_t * | FindOneInBox (rtree_t *rtree, routebox_t *rb) |
static int | ftherm_rect_in_reg (const BoxType *box, void *cl) |
routebox_t * | FindThermable (rtree_t *rtree, routebox_t *rb) |
Check for a pin or via target that a polygon can just use a thermal to connect to. | |
static void | RD_DrawVia (routedata_t *rd, Coord X, Coord Y, Coord radius, routebox_t *subnet, bool is_bad) |
static void | RD_DrawLine (routedata_t *rd, Coord X1, Coord Y1, Coord X2, Coord Y2, Coord halfthick, Cardinal group, routebox_t *subnet, bool is_bad, bool is_45) |
static bool | RD_DrawManhattanLine (routedata_t *rd, const BoxType *box1, const BoxType *box2, CheapPointType start, CheapPointType end, Coord halfthick, Cardinal group, routebox_t *subnet, bool is_bad, bool last_was_x) |
static void | TracePath (routedata_t *rd, routebox_t *path, const routebox_t *target, routebox_t *subnet, bool is_bad) |
This back-traces the expansion boxes along the best path it draws the lines that will make the actual path. | |
static void | CreateSearchEdge (struct routeone_state *s, vetting_t *work, edge_t *parent, routebox_t *rb, conflict_t conflict, rtree_t *targets, bool in_plane) |
Create a fake "edge" used to defer via site searching. | |
void | add_via_sites (struct routeone_state *s, struct routeone_via_site_state *vss, mtspace_t *mtspace, routebox_t *within, conflict_t within_conflict_level, edge_t *parent_edge, rtree_t *targets, Coord shrink, bool in_plane) |
void | do_via_search (edge_t *search, struct routeone_state *s, struct routeone_via_site_state *vss, mtspace_t *mtspace, rtree_t *targets) |
static int | __conflict_source (const BoxType *box, void *cl) |
static void | source_conflicts (rtree_t *tree, routebox_t *rb) |
static struct routeone_status | RouteOne (routedata_t *rd, routebox_t *from, routebox_t *to, int max_edges) |
static void | InitAutoRouteParameters (int pass, RouteStyleType *style, bool with_conflicts, bool is_smoothing, bool lastpass) |
int | bad_boy (const BoxType *b, void *cl) |
bool | no_expansion_boxes (routedata_t *rd) |
static void | ripout_livedraw_obj (routebox_t *rb) |
static int | ripout_livedraw_obj_cb (const BoxType *b, void *cl) |
static double | calculate_progress (double this_heap_item, double this_heap_size, struct routeall_status *ras) |
struct routeall_status | RouteAll (routedata_t *rd) |
static int | fpin_rect (const BoxType *b, void *cl) |
static int | FindPin (const BoxType *box, PinType **pin) |
bool | IronDownAllUnfixedPaths (routedata_t *rd) |
Paths go on first 'on' layer in group. | |
bool | AutoRoute (bool selected) |
Variables | |
struct { | |
RouteStyleType * style | |
Coord bloat | |
cost_t ViaCost | |
cost_t LastConflictPenalty | |
cost_t ConflictPenalty | |
cost_t JogPenalty | |
cost_t CongestionPenalty | |
cost_t NewLayerPenalty | |
cost_t MinPenalty | |
int hi_conflict | |
bool use_vias | |
bool is_odd | |
bool with_conflicts | |
bool is_smoothing | |
bool rip_always | |
bool last_smooth | |
unsigned char pass | |
} | AutoRouteParameters |
static Cardinal | front |
static Cardinal | back |
static bool | usedGroup [MAX_GROUP] |
static int | x_cost [MAX_GROUP] |
static int | y_cost [MAX_GROUP] |
static bool | is_layer_group_active [MAX_GROUP] |
static int | ro = 0 |
static int | smoothes = 1 |
static int | passes = 12 |
static int | routing_layers = 0 |
static float | total_wire_length = 0 |
static int | total_via_count = 0 |
vector_t * | area_vec |
Functions used to autoroute nets.
this file, autoroute.c, was written and is
Copyright (c) 2001 C. Scott Ananian
Copyright (c) 2006 harry eaton
Copyright (c) 2009 harry eaton
This file implements a rectangle-expansion router, based on "A Method for Gridless Routing of Printed Circuit Boards" by A. C. Finch, K. J. Mackenzie, G. J. Balsdon, and G. Symonds in the 1985 Proceedings of the 22nd ACM/IEEE Design Automation Conference.
This reference is available from the ACM Digital Library at http://www.acm.org/dl for those with institutional or personal access to it. It's also available from your local engineering library.
The code is much closer to what is described in the paper now, in that expansion areas can grow from corners and in all directions at once. Previously, these were emulated with discrete boxes moving in the cardinal directions. With the new method, there are fewer but larger expansion boxes that one might do a better job of routing in.
PCB, interactive printed circuit board design
Copyright (C) 1994,1995,1996 Thomas Nau
Copyright (C) 1998,1999,2000,2001 harry eaton
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
Contact addresses for paper mail and Email: harry eaton, 6697 Buttonhole Ct, Columbia, MD 21044 USA haceaton@aplcomm.jhuapl.edu
Definition in file autoroute.c.
#define _EAST 2 |
Definition at line 172 of file autoroute.c.
Referenced by __Expand_this_rect(), and Expand().
#define _NORTH 1 |
Definition at line 171 of file autoroute.c.
Referenced by __Expand_this_rect(), and Expand().
#define _SOUTH 4 |
Definition at line 173 of file autoroute.c.
Referenced by __Expand_this_rect(), and Expand().
#define _WEST 8 |
Definition at line 174 of file autoroute.c.
Referenced by __Expand_this_rect(), and Expand().
Definition at line 158 of file autoroute.c.
Referenced by CreateRouteData().
#define CONFLICT_LEVEL | ( | rb | ) |
(((rb)->flags.is_odd==AutoRouteParameters.is_odd) ?\ HI_CONFLICT : LO_CONFLICT )
Definition at line 162 of file autoroute.c.
#define CONFLICT_PENALTY | ( | rb | ) |
((CONFLICT_LEVEL(rb)==HI_CONFLICT ? \ AutoRouteParameters.ConflictPenalty : \ CONFLICT_LEVEL(rb)==LO_CONFLICT ? \ AutoRouteParameters.LastConflictPenalty : 1) * (rb)->pass)
Definition at line 165 of file autoroute.c.
Referenced by moveable_edge().
#define END_FOREACH | ( | net, | |
p | |||
) |
}; \ END_LOOP;\ /* reset subnet_processed flags */\ LIST_LOOP(net, same_net, p); \ p->flags.subnet_processed=0;\ END_LOOP;\ } while (0)
Definition at line 198 of file autoroute.c.
Referenced by AutoRoute(), and RouteAll().
#define EXPENSIVE 3e28 |
Definition at line 153 of file autoroute.c.
Referenced by best_path_candidate(), InitAutoRouteParameters(), mincost_target_to_point(), RouteAll(), and RouteOne().
#define FOREACH_SUBNET | ( | net, | |
p | |||
) |
do {\ routebox_t *_pp_;\ /* fail-fast: check subnet_processed flags */\ LIST_LOOP(net, same_net, p); \ assert(!p->flags.subnet_processed);\ END_LOOP;\ /* iterate through *distinct* subnets */\ LIST_LOOP(net, same_net, p); \ if (!p->flags.subnet_processed) {\ LIST_LOOP(p, same_subnet, _pp_);\ _pp_->flags.subnet_processed=1;\ END_LOOP
Definition at line 186 of file autoroute.c.
Referenced by AutoRoute(), and RouteAll().
Definition at line 155 of file autoroute.c.
Referenced by add_via_sites(), AddLine(), AddPad(), AddPin(), bloat_routebox(), do_via_search(), InitAutoRouteParameters(), IronDownAllUnfixedPaths(), and TracePath().
#define LIST_LOOP | ( | init, | |
which, | |||
x | |||
) |
do {\ routebox_t *__next_one__ = (init);\ x = NULL;\ if (!__next_one__)\ assert(__next_one__);\ else\ while (!x || __next_one__ != (init)) {\ x = __next_one__;\ /* save next one first in case the command modifies or frees it */\ __next_one__ = x->which.next
Definition at line 176 of file autoroute.c.
Referenced by AutoRoute(), CreateRouteData(), IronDownAllUnfixedPaths(), ResetSubnet(), RouteAll(), RouteOne(), and touch_conflicts().
#define NET_HEAP 1 |
Definition at line 60 of file autoroute.c.
Definition at line 206 of file autoroute.c.
typedef struct edge_struct edge_t |
typedef struct routebox_list routebox_list |
typedef struct routebox routebox_t |
typedef struct routedata routedata_t |
enum boxlist |
Definition at line 521 of file autoroute.c.
enum conflict_t |
Definition at line 225 of file autoroute.c.
enum etype |
Definition at line 234 of file autoroute.c.
static int __conflict_source | ( | const BoxType * | box, |
void * | cl | ||
) | [static] |
Definition at line 4037 of file autoroute.c.
References routebox::conflicts_with, routebox::fixed, routebox::flags, path_conflicts(), touch_conflicts(), and routebox::touched.
Referenced by source_conflicts().
static int __edge_is_good | ( | edge_t * | e | ) | [static] |
Definition at line 491 of file autoroute.c.
References __routebox_is_good(), ALL, routebox::conflicts_with, edge_struct::cost, edge_struct::cost_to_point, edge_struct::expand_dir, edge_struct::flags, routebox::flags, routebox::homeless, routebox::is_via, edge_struct::is_via, edge_struct::rb, routebox::refcount, and edge_struct::via_conflict_level.
Referenced by add_or_destroy_edge(), CreateEdge(), CreateEdgeWithConflicts(), CreateViaEdge(), and RouteOne().
static int __Expand_this_rect | ( | const BoxType * | box, |
void * | cl | ||
) | [static] |
Test method for Expand().
This routebox potentially is a blocker limiting expansion if this is so, we limit the inflate box so another exactly like it wouldn't be seen. We do this while keep the inflated box as large as possible.
Definition at line 2144 of file autoroute.c.
References _EAST, _NORTH, _SOUTH, _WEST, E_result::bloat, bloat, bloat_box(), E_result::done, E_result::e, EXPANSION_AREA, routebox::expansion_area, routebox::flags, E_result::inflated, routebox::is_via, E_result::keep, RouteStyleType::Keepaway, E_result::n, routebox::nobloat, E_result::orig, routebox::parent, E_result::parent, PLANE, E_result::s, routebox::sbox, routebox::source, routebox::style, routebox::touched, routebox::type, E_result::w, BoxType::X1, BoxType::X2, BoxType::Y1, and BoxType::Y2.
Referenced by Expand().
static int __found_new_guess | ( | const BoxType * | box, |
void * | cl | ||
) | [static] |
Definition at line 1696 of file autoroute.c.
References cost_to_routebox(), mincost_target_closure::CostPoint, mincost_target_closure::CostPointLayer, guess(), mincost_target_closure::nearest, and mincost_target_closure::nearest_cost.
Referenced by mincost_target_to_point().
static int __found_one_on_lg | ( | const BoxType * | box, |
void * | cl | ||
) | [static] |
Definition at line 867 of file autoroute.c.
References routebox::box, rb_info::env, routebox::flags, RouteStyleType::Keepaway, routebox::nonstraight, PLANE, rb_info::query, shrink_box(), routebox::style, routebox::type, rb_info::winner, BoxType::X1, BoxType::X2, BoxType::Y1, and BoxType::Y2.
Referenced by FindRouteBoxOnLayerGroup().
static int __GatherBlockers | ( | const BoxType * | box, |
void * | cl | ||
) | [static] |
Definition at line 2742 of file autoroute.c.
References AutoRouteParameters, bloat_box(), blocker_to_heap(), break_info::box, break_info::dir, routebox::expansion_area, routebox::flags, break_info::heap, break_info::ignore_source, RouteStyleType::Keepaway, routebox::parent, break_info::parent, routebox::sbox, routebox::source, routebox::style, routebox::touched, BoxType::X1, BoxType::X2, BoxType::Y1, and BoxType::Y2.
Referenced by BreakManyEdges().
static int __region_within_guess | ( | const BoxType * | region, |
void * | cl | ||
) | [static] |
Definition at line 1681 of file autoroute.c.
References cost_to_layerless_box(), mincost_target_closure::CostPoint, mincost_target_closure::CostPointLayer, and mincost_target_closure::nearest.
Referenced by mincost_target_to_point().
static int __routebox_is_good | ( | routebox_t * | rb | ) | [static] |
Definition at line 453 of file autoroute.c.
References routebox::box, c, routebox::clear_poly, routebox::conflicts_with, routebox::different_net, EXPANSION_AREA, routebox::fixed, routebox::flags, routebox::group, routebox::homeless, routebox::inited, routebox::is_odd, LINE, max_group, routebox_list::next, routebox::nobloat, routebox::original_subnet, OTHER, PLANE, routebox_list::prev, routebox::refcount, routebox::same_net, routebox::same_subnet, routebox::source, routebox::style, routebox::target, routebox::touched, routebox::type, vector_element(), vector_size(), VIA, VIA_SHADOW, BoxType::X1, BoxType::X2, BoxType::Y1, and BoxType::Y2.
Referenced by __edge_is_good(), bloat_routebox(), CreateEdge(), CreateSearchEdge(), RD_DrawLine(), and RD_DrawVia().
static struct routebox_list* __select_list | ( | routebox_t * | r, |
enum boxlist | which | ||
) | [static, read] |
Definition at line 524 of file autoroute.c.
References routebox::different_net, DIFFERENT_NET, NET, ORIGINAL, routebox::original_subnet, routebox::same_net, routebox::same_subnet, and SUBNET.
Referenced by InitLists(), MergeNets(), and RemoveFromNet().
static void add_or_destroy_edge | ( | struct routeone_state * | s, |
edge_t * | e | ||
) | [static] |
Definition at line 3797 of file autoroute.c.
References __edge_is_good(), routeone_state::best_cost, edge_struct::cost, DestroyEdge(), edge_cost(), routebox::group, heap_insert(), is_layer_group_active, edge_struct::rb, and routeone_state::workheap.
Referenced by do_via_search(), and RouteOne().
void add_via_sites | ( | struct routeone_state * | s, |
struct routeone_via_site_state * | vss, | ||
mtspace_t * | mtspace, | ||
routebox_t * | within, | ||
conflict_t | within_conflict_level, | ||
edge_t * | parent_edge, | ||
rtree_t * | targets, | ||
Coord | shrink, | ||
bool | in_plane | ||
) |
Definition at line 3843 of file autoroute.c.
References AutoRouteParameters, edge_struct::cost_point, CreateSearchEdge(), routeone_via_site_state::free_space_vec, HALF_THICK, routeone_via_site_state::hi_conflict_space_vec, routeone_via_site_state::lo_conflict_space_vec, mtspace_query_rect(), region, shrink_box(), and shrink_routebox().
Referenced by RouteOne().
static routebox_t* AddArc | ( | PointerListType | layergroupboxes[], |
Cardinal | layergroup, | ||
ArcType * | arc, | ||
RouteStyleType * | style | ||
) | [static] |
Definition at line 850 of file autoroute.c.
References AddIrregularObstacle().
Referenced by CreateRouteData().
static routebox_t* AddIrregularObstacle | ( | PointerListType | layergroupboxes[], |
Coord | X1, | ||
Coord | Y1, | ||
Coord | X2, | ||
Coord | Y2, | ||
Cardinal | layergroup, | ||
void * | parent, | ||
RouteStyleType * | style | ||
) | [static] |
Definition at line 777 of file autoroute.c.
References GetPointerMemory(), init_const_box(), InitLists(), RouteStyleType::Keepaway, PCBType::LayerGroups, malloc(), max_group, LayerGroupType::Number, OTHER, routebox::parent, PCB, and style.
Referenced by AddArc(), AddPolygon(), and AddText().
static routebox_t* AddLine | ( | PointerListType | layergroupboxes[], |
int | layergroup, | ||
LineType * | line, | ||
LineType * | ptr, | ||
RouteStyleType * | style | ||
) | [static] |
Definition at line 733 of file autoroute.c.
References ALL, GetPointerMemory(), HALF_THICK, init_const_box(), InitLists(), RouteStyleType::Keepaway, PCBType::LayerGroups, LINE, malloc(), MAX, max_group, MIN, LayerGroupType::Number, PCB, ptr, and style.
Referenced by CreateRouteData().
static routebox_t* AddPad | ( | PointerListType | layergroupboxes[], |
ElementType * | element, | ||
PadType * | pad, | ||
RouteStyleType * | style | ||
) | [static] |
Definition at line 698 of file autoroute.c.
References ALL, back, front, GetPointerMemory(), HALF_THICK, init_const_box(), InitLists(), RouteStyleType::Keepaway, PCBType::LayerGroups, malloc(), MAX, max_group, MIN, LayerGroupType::Number, routebox::pad, PAD, PCB, style, and TEST_FLAG.
Referenced by CreateRouteData().
static routebox_t* AddPin | ( | PointerListType | layergroupboxes[], |
PinType * | pin, | ||
bool | is_via, | ||
RouteStyleType * | style | ||
) | [static] |
Definition at line 651 of file autoroute.c.
References ALL, pin_st::DrillingHole, GetPointerMemory(), HALF_THICK, init_const_box(), InitLists(), RouteStyleType::Keepaway, malloc(), MAX, max_group, MergeNets(), NET, ORIGINAL, PIN, pin, style, SUBNET, TEST_FLAG, pin_st::Thickness, VIA, pin_st::X, and pin_st::Y.
Referenced by CreateRouteData().
static routebox_t* AddPolygon | ( | PointerListType | layergroupboxes[], |
Cardinal | layer, | ||
PolygonType * | polygon, | ||
RouteStyleType * | style | ||
) | [static] |
Definition at line 805 of file autoroute.c.
References AddIrregularObstacle(), ALL, routebox::came_from, routebox::clear_poly, routebox::flags, GetLayerGroupNumberByNumber(), polygon_st::HoleIndexN, layer, routebox::layer, max_group, routebox::nonstraight, PLANE, polygon_st::PointN, polygon_st::Points, TEST_FLAG, routebox::type, PointType::X, and PointType::Y.
Referenced by CreateRouteData().
static void AddText | ( | PointerListType | layergroupboxes[], |
Cardinal | layergroup, | ||
TextType * | text, | ||
RouteStyleType * | style | ||
) | [static] |
Definition at line 841 of file autoroute.c.
References AddIrregularObstacle().
Referenced by CreateRouteData().
bool AutoRoute | ( | bool | selected | ) |
Definition at line 5228 of file autoroute.c.
References AddAllRats(), AddObjectToFlagUndoList(), ASSIGN_FLAG, CreateRouteData(), PCBType::Data, DeleteRats(), hid_draw_st::destroy_gc, DestroyRouteData(), RouteStyleType::Diameter, DIFFERENT_NET, routebox::different_net, DrawRat(), END_FOREACH, END_LOOP, FindRouteBoxOnLayerGroup(), hid_st::finish_debug_draw, routedata::first_net, routebox::flags, FOREACH_SUBNET, routeone_status::found_route, gui, RouteStyleType::Hole, IncrementUndoSerialNumber(), InitAutoRouteParameters(), IronDownAllUnfixedPaths(), RouteStyleType::Keepaway, routedata::layergrouptree, LIST_LOOP, hid_draw_st::make_gc, max_group, MergeNets(), Message(), NET, routebox_list::next, PCB, routebox_list::prev, hid_st::progress, r_search(), RAT_LOOP, DataType::RatN, Redraw(), RemoveFromNet(), hid_st::request_debug_draw, RestoreUndoSerialNumber(), ripout_livedraw_obj_cb(), Round_Cap, RouteAll(), RouteOne(), PCBType::RouteStyle, routebox::same_net, routebox::same_subnet, SaveUndoSerialNumber(), hid_draw_st::set_line_cap, routebox::style, TEST_FLAG, RouteStyleType::Thick, routeall_status::total_nets_routed, total_via_count, total_wire_length, and routebox::touched.
Referenced by ActionAutoRoute().
int bad_boy | ( | const BoxType * | b, |
void * | cl | ||
) |
Definition at line 4652 of file autoroute.c.
References box, EXPANSION_AREA, and routebox::type.
Referenced by no_expansion_boxes().
static void best_path_candidate | ( | struct routeone_state * | s, |
edge_t * | e, | ||
routebox_t * | best_target | ||
) | [static] |
Definition at line 3809 of file autoroute.c.
References routeone_state::best_cost, routeone_state::best_path, routeone_state::best_target, edge_struct::cost, edge_cost(), EXPENSIVE, routebox::flags, routebox::homeless, edge_struct::rb, RB_down_count(), and RB_up_count().
Referenced by moveable_edge(), and RouteOne().
static BoxType bloat_routebox | ( | routebox_t * | rb | ) | [static] |
Definition at line 1457 of file autoroute.c.
References __routebox_is_good(), AutoRouteParameters, bloat_box(), routebox::flags, HALF_THICK, RouteStyleType::Keepaway, MAX, routebox::nobloat, routebox::sbox, and routebox::style.
Referenced by break_box_edge(), foib_rect_in_reg(), and RouteOne().
static int blocker_to_heap | ( | heap_t * | heap, |
routebox_t * | rb, | ||
BoxType * | box, | ||
direction_t | dir | ||
) | [static] |
blocker_to_heap
puts the blockers into a heap so they can be retrieved in clockwise order. If a blocker is also a target, it gets put into the vector too. It returns 1 for any fixed blocker that is not part of this net and zero otherwise.
Definition at line 2455 of file autoroute.c.
References AutoRouteParameters, bloat_box(), box_is_good(), clip_box(), EAST, routebox::fixed, routebox::flags, heap_insert(), RouteStyleType::Keepaway, NORTH, routebox::sbox, routebox::source, SOUTH, routebox::style, routebox::target, WEST, BoxType::X1, BoxType::X2, BoxType::Y1, and BoxType::Y2.
Referenced by __GatherBlockers(), and BreakManyEdges().
static bool boink_box | ( | routebox_t * | rb, |
struct E_result * | res, | ||
direction_t | dir | ||
) | [static] |
Definition at line 2261 of file autoroute.c.
References E_result::bloat, bloat, EAST, routebox::flags, E_result::inflated, E_result::keep, RouteStyleType::Keepaway, routebox::nobloat, NORTH, routebox::sbox, SOUTH, routebox::style, WEST, BoxType::X1, BoxType::X2, BoxType::Y1, and BoxType::Y2.
Referenced by Expand().
Definition at line 627 of file autoroute.c.
References BoxType::X1, BoxType::X2, BoxType::Y1, and BoxType::Y2.
Referenced by BreakManyEdges().
static struct broken_boxes break_box_edge | ( | const BoxType * | original, |
direction_t | which_edge, | ||
routebox_t * | breaker | ||
) | [static, read] |
Definition at line 2023 of file autoroute.c.
References bloat_routebox(), broken_boxes::center, broken_boxes::is_valid_center, broken_boxes::is_valid_left, broken_boxes::is_valid_right, broken_boxes::left, MAX, MIN, broken_boxes::right, ROTATEBOX_FROM_NORTH, ROTATEBOX_TO_NORTH, BoxType::X1, BoxType::X2, BoxType::Y1, and BoxType::Y2.
Referenced by BreakManyEdges().
vector_t* BreakManyEdges | ( | struct routeone_state * | s, |
rtree_t * | targets, | ||
rtree_t * | tree, | ||
vector_t * | area_vec, | ||
struct E_result * | ans, | ||
routebox_t * | rb, | ||
edge_t * | e | ||
) |
Break all the edges of the box that need breaking, handling targets as they are found, and putting any moveable edges in the return vector.
Definition at line 2797 of file autoroute.c.
References __GatherBlockers(), ALL, AutoRouteParameters, bloat, bloat_box(), blocker_to_heap(), break_info::box, routebox::box, box_area(), break_box_edge(), routebox::came_from, broken_boxes::center, routebox::cost, routebox::different_net, break_info::dir, directionIncrement(), routebox::e, EAST, edge_struct::expand_dir, routebox::expansion_area, fake, routebox::fixed, routebox::flags, break_info::heap, heap_create(), heap_destroy(), heap_is_empty(), heap_remove_smallest(), break_info::ignore_source, routebox::inited, broken_boxes::is_valid_center, broken_boxes::is_valid_left, broken_boxes::is_valid_right, broken_boxes::left, LINE, MAX, MIN, moveable_edge(), routebox::n, NE, routebox_list::next, NORTH, NW, routebox::original_subnet, break_info::parent, routebox::parent, routebox_list::prev, previous_edge(), r_search(), edge_struct::rb, broken_boxes::right, routebox::s, routebox::same_net, routebox::same_subnet, routebox::sbox, SE, routebox::source, SOUTH, routebox::style, SW, routebox::type, vector_create(), routebox::w, WEST, BoxType::X1, BoxType::X2, BoxType::Y1, and BoxType::Y2.
Referenced by RouteOne().
static double calculate_progress | ( | double | this_heap_item, |
double | this_heap_size, | ||
struct routeall_status * | ras | ||
) | [static] |
Definition at line 4720 of file autoroute.c.
References AutoRouteParameters, routeall_status::conflict_subnets, routeall_status::failed, passes, routeall_status::routed_subnets, smoothes, and routeall_status::total_subnets.
Referenced by RouteAll().
static CheapPointType closest_point_in_routebox | ( | const CheapPointType * | from, |
const routebox_t * | rb | ||
) | [inline, static] |
Definition at line 634 of file autoroute.c.
References closest_point_in_box(), and routebox::sbox.
Referenced by cost_to_routebox(), CreateViaEdge(), and TracePath().
static cost_t cost_to_layerless_box | ( | const CheapPointType * | p, |
Cardinal | point_layer, | ||
const BoxType * | b | ||
) | [static] |
Return the minimum *cost* from a point to a box on any layer.
It's safe to return a smaller than minimum cost.
Definition at line 1376 of file autoroute.c.
References AutoRouteParameters, closest_point_in_box(), cheap_point::X, and cheap_point::Y.
Referenced by __region_within_guess(), and CreateSearchEdge().
static cost_t cost_to_point | ( | const CheapPointType * | p1, |
Cardinal | point_layer1, | ||
const CheapPointType * | p2, | ||
Cardinal | point_layer2 | ||
) | [static] |
Definition at line 1360 of file autoroute.c.
References AutoRouteParameters, and cost_to_point_on_layer().
Referenced by CreateEdge(), and CreateViaEdge().
static cost_t cost_to_point_on_layer | ( | const CheapPointType * | p1, |
const CheapPointType * | p2, | ||
Cardinal | point_layer | ||
) | [inline, static] |
Definition at line 1346 of file autoroute.c.
References AutoRouteParameters, cheap_point::X, x_cost, cheap_point::Y, and y_cost.
Referenced by cost_to_point(), CreateBridge(), CreateEdge2(), CreateEdgeWithConflicts(), CreateExpansionArea(), CreateViaEdge(), and moveable_edge().
static cost_t cost_to_routebox | ( | const CheapPointType * | p, |
Cardinal | point_layer, | ||
const routebox_t * | rb | ||
) | [static] |
Return the *minimum cost* from a point to a route box, including possible via costs if the route box is on a different layer.
Assume routbox is bloated unless it is an expansion area.
Definition at line 1435 of file autoroute.c.
References AutoRouteParameters, closest_point_in_routebox(), routebox::group, max_group, usedGroup, cheap_point::X, and cheap_point::Y.
Referenced by __found_new_guess(), edge_cost(), and mincost_target_to_point().
static routebox_t* CreateBridge | ( | const BoxType * | area, |
routebox_t * | parent, | ||
direction_t | dir | ||
) | [static] |
This creates an EXPANSION_AREA to bridge small gaps or, (more commonly) create a supper-thin box to provide a home for an expansion edge.
Definition at line 2498 of file autoroute.c.
References closest_point_in_box(), routebox::conflicts_with, routebox::cost, routebox::cost_point, cost_to_point_on_layer(), EXPANSION_AREA, routebox::group, init_const_box(), malloc(), RB_up_count(), route_parent(), routebox::style, BoxType::X1, BoxType::X2, BoxType::Y1, and BoxType::Y2.
Referenced by moveable_edge().
static edge_t* CreateEdge | ( | routebox_t * | rb, |
Coord | CostPointX, | ||
Coord | CostPointY, | ||
cost_t | cost_to_point, | ||
routebox_t * | mincost_target_guess, | ||
direction_t | expand_dir, | ||
rtree_t * | targets | ||
) | [static] |
Create edge from field values.
mincost_target_guess can be NULL
.
Definition at line 1747 of file autoroute.c.
References __edge_is_good(), __routebox_is_good(), ALL, routebox::conflicts_with, cost_to_point(), routebox::e, EAST, expand_dir(), routebox::flags, routebox::group, routebox::homeless, routebox::is_thermal, routebox::is_via, malloc(), mincost_target_to_point(), NORTH, PLANE, RB_up_count(), routebox::sbox, SOUTH, routebox::type, BoxType::X1, BoxType::X2, BoxType::Y1, and BoxType::Y2.
Referenced by CreateEdge2(), CreateEdgeWithConflicts(), CreateViaEdge(), moveable_edge(), and RouteOne().
static edge_t* CreateEdge2 | ( | routebox_t * | rb, |
direction_t | expand_dir, | ||
edge_t * | previous_edge, | ||
rtree_t * | targets, | ||
routebox_t * | guess | ||
) | [static] |
Create edge, using previous edge to fill in defaults.
Most of the work here is in determining a new cost point.
Definition at line 1799 of file autoroute.c.
References AutoRouteParameters, closest_point_in_box(), edge_struct::cost_point, edge_struct::cost_to_point, cost_to_point_on_layer(), CreateEdge(), edge_to_box(), edge_struct::expand_dir, routebox::group, edge_struct::mincost_target, cheap_point::X, and cheap_point::Y.
Referenced by RouteOne().
static edge_t* CreateEdgeWithConflicts | ( | const BoxType * | interior_edge, |
routebox_t * | container, | ||
edge_t * | previous_edge, | ||
cost_t | cost_penalty_to_box, | ||
rtree_t * | targets | ||
) | [static] |
Create "interior" edge for routing with conflicts.
Presently once we "jump inside" the conflicting object we consider it a routing highway to travel inside since it will become available if the conflict is elliminated. That is why we ignore the interior_edge argument.
Definition at line 1914 of file autoroute.c.
References __edge_is_good(), ALL, AutoRouteParameters, closest_point_in_box(), edge_struct::cost_point, edge_struct::cost_to_point, cost_to_point_on_layer(), CreateEdge(), CreateExpansionArea(), edge_struct::flags, routebox::flags, routebox::group, routebox::homeless, edge_struct::is_interior, path_conflicts(), edge_struct::rb, routebox::touched, cheap_point::X, and cheap_point::Y.
Referenced by RouteOne().
static routebox_t * CreateExpansionArea | ( | const BoxType * | area, |
Cardinal | group, | ||
routebox_t * | parent, | ||
bool | relax_edge_requirements, | ||
edge_t * | src_edge | ||
) | [static] |
Area is the expansion area, on layer group 'group'.
'parent' is the immediately preceding expansion area, for backtracing. 'lastarea' is the last expansion area created, we string these together in a loop so we can remove them all easily at the end.
Definition at line 2087 of file autoroute.c.
References AutoRouteParameters, box_intersect(), closest_point_in_box(), routebox::conflicts_with, cost_to_point_on_layer(), edge_intersect(), edge_struct::expand_dir, EXPANSION_AREA, routebox::group, init_const_box(), malloc(), RB_up_count(), route_parent(), routebox::sbox, share_edge(), BoxType::X1, BoxType::X2, BoxType::Y1, and BoxType::Y2.
Referenced by CreateEdgeWithConflicts(), CreateViaEdge(), and RouteOne().
static routedata_t* CreateRouteData | ( | ) | [static] |
Definition at line 945 of file autoroute.c.
References AddArc(), AddLine(), AddPad(), AddPin(), AddPolygon(), AddText(), ALLPAD_LOOP, ALLPIN_LOOP, ARC_LOOP, AutoRouteParameters, back, BLOAT, BOTTOM_SIDE, routebox::box, CLEAR_FLAG, routebox::clear_poly, CollectSubnets(), connection(), CONNECTION_LOOP, PCBType::Data, routebox::different_net, DIFFERENT_NET, END_LOOP, ENDALL_LOOP, LayerGroupType::Entries, FIXED, routebox::flags, FreeNetListListMemory(), FreePointerListMemory(), front, GetLayerGroupNumberByNumber(), GetLayerGroupNumberBySide(), GetLayerNumber(), routebox::group, GROUP_LOOP, is_layer_group_active, RouteStyleType::Keepaway, SettingType::Keepaway, layer, DataType::Layer, LAYER_PTR, PCBType::LayerGroups, line, LINE_LOOP, SettingType::LineThickness, LIST_LOOP, malloc(), MAX, max_copper_layer, max_group, PCBType::MaxHeight, PCBType::MaxWidth, MergeNets(), mtspace_add(), mtspace_create(), n, NET, NET_LOOP, NETLIST_LOOP, LayerGroupType::Number, LayerType::On, ORIGINAL, routebox::pad, PCB, pin, POINTER_LOOP, POLYGON_LOOP, ptr, PointerListType::Ptr, PointerListType::PtrMax, PointerListType::PtrN, r_create_tree(), ResetSubnet(), PCBType::RouteStyle, routing_layers, SET_FLAG, Settings, routebox::style, style, TEST_FLAG, TEXT_LOOP, TOP_SIDE, usedGroup, routebox::via, VIA_LOOP, SettingType::ViaDrillingHole, PCBType::ViaOn, SettingType::ViaThickness, BoxType::X1, BoxType::X2, x_cost, BoxType::Y1, BoxType::Y2, and y_cost.
Referenced by AutoRoute().
static void CreateSearchEdge | ( | struct routeone_state * | s, |
vetting_t * | work, | ||
edge_t * | parent, | ||
routebox_t * | rb, | ||
conflict_t | conflict, | ||
rtree_t * | targets, | ||
bool | in_plane | ||
) | [static] |
Create a fake "edge" used to defer via site searching.
Definition at line 3751 of file autoroute.c.
References __routebox_is_good(), AutoRouteParameters, routebox::cost, routebox::cost_point, edge_struct::cost_point, cost_to_layerless_box(), edge_struct::cost_to_point, routebox::flags, heap_insert(), routebox::homeless, malloc(), max_group, edge_struct::mincost_target, mincost_target_to_point(), mtsFreeWork(), RB_up_count(), shrink_routebox(), routebox::target, and routeone_state::workheap.
Referenced by add_via_sites(), and do_via_search().
static edge_t* CreateViaEdge | ( | const BoxType * | area, |
Cardinal | group, | ||
routebox_t * | parent, | ||
edge_t * | previous_edge, | ||
conflict_t | to_site_conflict, | ||
conflict_t | through_site_conflict, | ||
rtree_t * | targets | ||
) | [static] |
Create via edge, using previous edge to fill in defaults.
Definition at line 1828 of file autoroute.c.
References __edge_is_good(), ALL, AutoRouteParameters, routebox::box, box_is_good(), routebox::came_from, CENTER_X, CENTER_Y, closest_point_in_routebox(), edge_struct::cost_point, edge_struct::cost_to_point, cost_to_point(), cost_to_point_on_layer(), CreateEdge(), CreateExpansionArea(), edge_struct::flags, routebox::flags, routebox::group, edge_struct::in_plane, edge_struct::is_via, routebox::is_via, edge_struct::mincost_target, mincost_target_to_point(), NO_CONFLICT, point_in_shrunk_box(), edge_struct::rb, scale, routebox::target, edge_struct::via_conflict_level, cheap_point::X, and cheap_point::Y.
Referenced by do_via_search(), and RouteOne().
static void DestroyEdge | ( | edge_t ** | e | ) | [static] |
Definition at line 1958 of file autoroute.c.
References KillEdge().
Referenced by add_or_destroy_edge(), moveable_edge(), and RouteOne().
void DestroyRouteData | ( | routedata_t ** | rd | ) |
Definition at line 1288 of file autoroute.c.
References AutoRouteParameters, max_group, mtspace_destroy(), and r_destroy_tree().
Referenced by AutoRoute().
static direction_t directionIncrement | ( | direction_t | dir | ) | [static] |
void do_via_search | ( | edge_t * | search, |
struct routeone_state * | s, | ||
struct routeone_via_site_state * | vss, | ||
mtspace_t * | mtspace, | ||
rtree_t * | targets | ||
) |
Definition at line 3875 of file autoroute.c.
References add_or_destroy_edge(), AutoRouteParameters, box_is_good(), close_box(), CreateSearchEdge(), CreateViaEdge(), edge_struct::flags, routeone_via_site_state::free_space_vec, routebox::group, HALF_THICK, HI_CONFLICT, routeone_via_site_state::hi_conflict_space_vec, edge_struct::in_plane, is_layer_group_active, LO_CONFLICT, routeone_via_site_state::lo_conflict_space_vec, max_group, mtspace_query_rect(), NO_CONFLICT, edge_struct::rb, shrink_box(), vector_is_empty(), vector_remove_last(), edge_struct::via_conflict_level, edge_struct::via_search, within(), and edge_struct::work.
Referenced by RouteOne().
Cost function for an edge.
Definition at line 1969 of file autoroute.c.
References edge_struct::cost_point, edge_struct::cost_to_point, cost_to_routebox(), routebox::flags, routebox::group, routebox::is_thermal, edge_struct::mincost_target, penalty(), PLANE, edge_struct::rb, and routebox::type.
Referenced by add_or_destroy_edge(), best_path_candidate(), and RouteOne().
Definition at line 2071 of file autoroute.c.
References BoxType::X1, BoxType::X2, BoxType::Y1, and BoxType::Y2.
Referenced by CreateExpansionArea().
static BoxType edge_to_box | ( | const routebox_t * | rb, |
direction_t | expand_dir | ||
) | [static] |
Given an edge of a box, return a box containing exactly the points on that edge.
Note that the return box is treated as closed; that is, the bottom and right "edges" consist of points (just barely) not in the (half-open) box.
Definition at line 1991 of file autoroute.c.
References EAST, NORTH, shrink_routebox(), SOUTH, WEST, BoxType::X1, BoxType::X2, BoxType::Y1, and BoxType::Y2.
Referenced by CreateEdge2().
Main Expand routine.
The expansion probe edge includes the keepaway and half thickness as the search is performed in order to see everything relevant. The result is backed off by this amount before being returned. Targets (and other no-bloat routeboxes) go all the way to touching. This is accomplished by backing off the probe edge when checking for touch against such an object. Usually the expanding edge bumps into neighboring pins on the same device that require a keepaway, preventing seeing a target immediately. Rather than await another expansion to actually touch the target, the edge breaker code looks past the keepaway to see these targets even though they weren't actually touched in the expansion.
Definition at line 2307 of file autoroute.c.
References __Expand_this_rect(), _EAST, _NORTH, _SOUTH, _WEST, ALL, AutoRouteParameters, E_result::bloat, boink_box(), box, routebox::came_from, E_result::done, E_result::e, EAST, edge_struct::expand_dir, E_result::inflated, E_result::keep, RouteStyleType::Keepaway, PCBType::MaxHeight, PCBType::MaxWidth, E_result::n, NE, nonhomeless_parent(), NORTH, NW, E_result::orig, E_result::parent, PCB, r_search(), edge_struct::rb, E_result::s, SE, SOUTH, routebox::style, SW, E_result::w, WEST, BoxType::X1, BoxType::X2, BoxType::Y1, and BoxType::Y2.
Referenced by RouteOne().
static routebox_t* FindOneInBox | ( | rtree_t * | rtree, |
routebox_t * | rb | ||
) | [static] |
Definition at line 3140 of file autoroute.c.
References foib_info::box, foib_info::env, foib_rect_in_reg(), foib_info::intersect, r_search(), and routebox::sbox.
Referenced by RouteOne().
Definition at line 5056 of file autoroute.c.
References PCBType::Data, fpin_info::env, fpin_rect(), PCB, fpin_info::pin, DataType::pin_tree, r_search(), DataType::via_tree, fpin_info::X, BoxType::X1, fpin_info::Y, and BoxType::Y1.
Referenced by IronDownAllUnfixedPaths().
static routebox_t* FindRouteBoxOnLayerGroup | ( | routedata_t * | rd, |
Coord | X, | ||
Coord | Y, | ||
Cardinal | layergroup | ||
) | [static] |
Definition at line 886 of file autoroute.c.
References __found_one_on_lg(), rb_info::env, routedata::layergrouptree, point_box(), rb_info::query, r_search(), and rb_info::winner.
Referenced by AutoRoute().
routebox_t* FindThermable | ( | rtree_t * | rtree, |
routebox_t * | rb | ||
) |
Check for a pin or via target that a polygon can just use a thermal to connect to.
Definition at line 3218 of file autoroute.c.
References therm_info::env, ftherm_rect_in_reg(), therm_info::plane, therm_info::query, r_search(), and shrink_routebox().
Referenced by RouteOne().
static int foib_rect_in_reg | ( | const BoxType * | box, |
void * | cl | ||
) | [static] |
Definition at line 3122 of file autoroute.c.
References bloat_routebox(), foib_info::box, box_intersect(), foib_info::env, routebox::flags, foib_info::intersect, and routebox::touched.
Referenced by FindOneInBox().
static int fpin_rect | ( | const BoxType * | b, |
void * | cl | ||
) | [static] |
Definition at line 5043 of file autoroute.c.
References fpin_info::env, fpin_info::pin, pin, fpin_info::X, pin_st::X, fpin_info::Y, and pin_st::Y.
Referenced by FindPin().
static int ftherm_rect_in_reg | ( | const BoxType * | box, |
void * | cl | ||
) | [static] |
Definition at line 3161 of file autoroute.c.
References box_intersect(), CENTER_X, CENTER_Y, RouteStyleType::Diameter, therm_info::env, routebox::fixed, routebox::flags, routebox::group, routebox::parent, routebox::pin, PIN, therm_info::plane, therm_info::query, shrink_box(), shrink_routebox(), sq, routebox::style, pin_st::Thickness, routebox::type, routebox::via, VIA, VIA_SHADOW, pin_st::X, BoxType::X1, pin_st::Y, and BoxType::Y1.
Referenced by FindThermable().
static void init_const_box | ( | routebox_t * | rb, |
Coord | X1, | ||
Coord | Y1, | ||
Coord | X2, | ||
Coord | Y2, | ||
Coord | keepaway | ||
) | [static] |
Definition at line 601 of file autoroute.c.
References routebox::box, routebox::flags, routebox::inited, routebox::sbox, BoxType::X1, BoxType::X2, BoxType::Y1, and BoxType::Y2.
Referenced by AddIrregularObstacle(), AddLine(), AddPad(), AddPin(), CreateBridge(), CreateExpansionArea(), RD_DrawLine(), RD_DrawThermal(), and RD_DrawVia().
static void InitAutoRouteParameters | ( | int | pass, |
RouteStyleType * | style, | ||
bool | with_conflicts, | ||
bool | is_smoothing, | ||
bool | lastpass | ||
) | [static] |
Definition at line 4608 of file autoroute.c.
References AutoRouteParameters, RouteStyleType::Diameter, EXPENSIVE, HALF_THICK, INCH_TO_COORD, is_layer_group_active, is_smoothing, RouteStyleType::Keepaway, MAX, max_group, MIN, MinPenalty, passes, style, RouteStyleType::Thick, with_conflicts, x_cost, and y_cost.
Referenced by AutoRoute(), and RouteAll().
static void InitLists | ( | routebox_t * | r | ) | [static] |
Definition at line 542 of file autoroute.c.
References __select_list(), DIFFERENT_NET, NET, routebox_list::next, ORIGINAL, routebox_list::prev, and SUBNET.
Referenced by AddIrregularObstacle(), AddLine(), AddPad(), AddPin(), RD_DrawLine(), RD_DrawThermal(), and RD_DrawVia().
bool IronDownAllUnfixedPaths | ( | routedata_t * | rd | ) |
Paths go on first 'on' layer in group.
Returns 'true' if any paths were added.
Definition at line 5088 of file autoroute.c.
References AddObjectToClearPolyUndoList(), AddObjectToCreateUndoList(), AddObjectToFlagUndoList(), ASSIGN_THERM, routebox::bl_to_ur, routebox::box, ClearFromPolygon(), CreateDrawnLineOnLayer(), CreateNewVia(), PCBType::Data, RouteStyleType::Diameter, routebox::different_net, pin_st::Element, END_LOOP, LayerGroupType::Entries, EXPANSION_AREA, FindPin(), routedata::first_net, routebox::fixed, routebox::flags, routebox::group, HALF_THICK, RouteStyleType::Hole, is_layer_group_active, RouteStyleType::Keepaway, routebox::layer, layer, LAYER_PTR, PCBType::LayerGroups, routebox::line, LINE, LIST_LOOP, MakeFlags(), LayerGroupType::Number, LayerType::On, routebox::parent, PCB, pin, RestoreToPolygon(), routebox::same_net, routebox::sbox, shrink_box(), shrink_routebox(), routebox::style, TEST_FLAG, THERMAL, PCBType::ThermStyle, RouteStyleType::Thick, total_via_count, total_wire_length, routebox::type, routebox::via, VIA, routebox::via_shadow, VIA_SHADOW, BoxType::X1, BoxType::X2, BoxType::Y1, and BoxType::Y2.
Referenced by AutoRoute().
static void KillEdge | ( | void * | edge | ) | [static] |
Definition at line 1946 of file autoroute.c.
References edge_struct::flags, routebox::flags, routebox::homeless, mtsFreeWork(), edge_struct::rb, RB_down_count(), edge_struct::via_search, and edge_struct::work.
Referenced by DestroyEdge(), and RouteOne().
static void MergeNets | ( | routebox_t * | a, |
routebox_t * | b, | ||
enum boxlist | which | ||
) | [static] |
Definition at line 555 of file autoroute.c.
References __select_list(), EXPANSION_AREA, routebox_list::next, routebox_list::prev, and routebox::type.
Referenced by AddPin(), AutoRoute(), CreateRouteData(), RD_DrawLine(), RD_DrawThermal(), RD_DrawVia(), and RouteOne().
static routebox_t* mincost_target_to_point | ( | const CheapPointType * | CostPoint, |
Cardinal | CostPointLayer, | ||
rtree_t * | targets, | ||
routebox_t * | target_guess | ||
) | [static] |
target_guess
is our guess at what the nearest target is, or NULL
if we just plum don't have a clue.
Definition at line 1721 of file autoroute.c.
References __found_new_guess(), __region_within_guess(), cost_to_routebox(), mincost_target_closure::CostPoint, mincost_target_closure::CostPointLayer, EXPENSIVE, routebox::flags, mincost_target_closure::nearest, mincost_target_closure::nearest_cost, r_search(), and routebox::target.
Referenced by CreateEdge(), CreateSearchEdge(), and CreateViaEdge().
void moveable_edge | ( | vector_t * | result, |
const BoxType * | box, | ||
direction_t | dir, | ||
routebox_t * | rb, | ||
routebox_t * | blocker, | ||
edge_t * | e, | ||
rtree_t * | targets, | ||
struct routeone_state * | s, | ||
rtree_t * | tree, | ||
vector_t * | area_vec | ||
) |
moveable_edge
prepares the new search edges based on the starting box, direction and blocker if any.
Definition at line 2529 of file autoroute.c.
References ALL, AutoRouteParameters, best_path_candidate(), bloat_box(), routebox::box, box, box_intersect(), box_is_good(), closest_point_in_box(), CONFLICT_PENALTY, routebox::conflicts_with, routebox::cost, routebox::cost_point, cost_to_point_on_layer(), CreateBridge(), CreateEdge(), DestroyEdge(), EAST, routebox::expansion_area, EXPANSION_AREA, routebox::fixed, edge_struct::flags, routebox::flags, routebox::group, routebox::homeless, edge_struct::is_interior, PCBType::MaxHeight, PCBType::MaxWidth, edge_struct::mincost_target, NE, NORTH, NW, routebox::parent, path_conflicts(), PCB, r_insert_entry(), RB_down_count(), routebox::sbox, SE, shrink_box(), routebox::source, SOUTH, SW, routebox::target, routebox::touched, routebox::type, vector_append(), WEST, cheap_point::X, BoxType::X1, BoxType::X2, cheap_point::Y, BoxType::Y1, and BoxType::Y2.
Referenced by BreakManyEdges().
bool no_expansion_boxes | ( | routedata_t * | rd | ) |
Definition at line 4661 of file autoroute.c.
References bad_boy(), routedata::layergrouptree, max_group, r_search(), BoxType::X1, BoxType::X2, BoxType::Y1, and BoxType::Y2.
Referenced by RouteAll().
int no_planes | ( | const BoxType * | b, |
void * | cl | ||
) |
Definition at line 508 of file autoroute.c.
References PLANE, and routebox::type.
static routebox_t* nonhomeless_parent | ( | routebox_t * | rb | ) | [static] |
Return a "parent" of this edge which resides in a r-tree somewhere.
Actually, this "parent" *may* be a via box, which doesn't live in a r-tree.
Definition at line 1664 of file autoroute.c.
References route_parent().
Referenced by Expand().
static vector_t* path_conflicts | ( | routebox_t * | rb, |
routebox_t * | conflictor, | ||
bool | branch | ||
) | [static] |
Definition at line 1599 of file autoroute.c.
References routebox::conflicts_with, vector_append(), vector_create(), and vector_duplicate().
Referenced by __conflict_source(), CreateEdgeWithConflicts(), and moveable_edge().
static bool point_in_shrunk_box | ( | const routebox_t * | box, |
Coord | X, | ||
Coord | Y | ||
) | [inline, static] |
Definition at line 640 of file autoroute.c.
References point_in_box(), and shrink_routebox().
Referenced by CreateViaEdge().
static BoxType previous_edge | ( | Coord | last, |
direction_t | i, | ||
const BoxType * | b | ||
) | [inline, static] |
Shrink the box to the last limit for the previous direction, i.e. if dir is SOUTH, then this means fixing up an EAST leftover edge, which would be the southern most edge for that example.
Definition at line 2770 of file autoroute.c.
References EAST, Message(), SOUTH, WEST, BoxType::X1, BoxType::X2, and BoxType::Y1.
Referenced by BreakManyEdges().
static void RB_down_count | ( | routebox_t * | rb | ) | [static] |
Decrement the reference count on a routebox, freeing if this box becomes unused.
Definition at line 1318 of file autoroute.c.
References routebox::expansion_area, EXPANSION_AREA, routebox::flags, routebox::homeless, routebox::parent, routebox::refcount, and routebox::type.
Referenced by best_path_candidate(), KillEdge(), and moveable_edge().
static routebox_t* rb_source | ( | routebox_t * | rb | ) | [static] |
Definition at line 3101 of file autoroute.c.
References routebox::expansion_area, EXPANSION_AREA, routebox::flags, routebox::parent, routebox::source, and routebox::type.
Referenced by TracePath().
static void RB_up_count | ( | routebox_t * | rb | ) | [static] |
Increment the reference count on a routebox.
Definition at line 1307 of file autoroute.c.
References routebox::flags, routebox::homeless, and routebox::refcount.
Referenced by best_path_candidate(), CreateBridge(), CreateEdge(), CreateExpansionArea(), and CreateSearchEdge().
static void RD_DrawLine | ( | routedata_t * | rd, |
Coord | X1, | ||
Coord | Y1, | ||
Coord | X2, | ||
Coord | Y2, | ||
Coord | halfthick, | ||
Cardinal | group, | ||
routebox_t * | subnet, | ||
bool | is_bad, | ||
bool | is_45 | ||
) | [static] |
Definition at line 3325 of file autoroute.c.
References __routebox_is_good(), ALL, AutoRouteParameters, CreateNewLineOnLayer(), DrawLine(), LayerGroupType::Entries, EVEN, routebox::group, init_const_box(), InitLists(), routebox::is_bad, layer, LAYER_PTR, PCBType::LayerGroups, routedata::layergrouptree, line, LINE, MakeFlags(), malloc(), MAX, MergeNets(), MIN, routedata::mtspace, mtspace_add(), NET, ODD, PCB, r_insert_entry(), SUBNET, TEST_FLAG, and usedGroup.
Referenced by RD_DrawManhattanLine(), and TracePath().
static bool RD_DrawManhattanLine | ( | routedata_t * | rd, |
const BoxType * | box1, | ||
const BoxType * | box2, | ||
CheapPointType | start, | ||
CheapPointType | end, | ||
Coord | halfthick, | ||
Cardinal | group, | ||
routebox_t * | subnet, | ||
bool | is_bad, | ||
bool | last_was_x | ||
) | [static] |
Definition at line 3437 of file autoroute.c.
References AutoRouteParameters, MIN, point_in_box(), point_in_closed_box(), RD_DrawLine(), cheap_point::X, and cheap_point::Y.
Referenced by TracePath().
static void RD_DrawThermal | ( | routedata_t * | rd, |
Coord | X, | ||
Coord | Y, | ||
Cardinal | group, | ||
Cardinal | layer, | ||
routebox_t * | subnet, | ||
bool | is_bad | ||
) | [static] |
Route-tracing code: once we've got a path of expansion boxes, trace a line through them to actually create the connection.
Definition at line 3238 of file autoroute.c.
References AutoRouteParameters, routebox::group, init_const_box(), InitLists(), routebox::is_bad, layer, routedata::layergrouptree, malloc(), MergeNets(), NET, r_insert_entry(), SUBNET, and THERMAL.
Referenced by TracePath().
static void RD_DrawVia | ( | routedata_t * | rd, |
Coord | X, | ||
Coord | Y, | ||
Coord | radius, | ||
routebox_t * | subnet, | ||
bool | is_bad | ||
) | [static] |
Definition at line 3263 of file autoroute.c.
References __routebox_is_good(), ALL, AutoRouteParameters, CreateNewVia(), PCBType::Data, DrawVia(), EVEN, init_const_box(), InitLists(), routebox::is_bad, is_layer_group_active, routedata::layergrouptree, MakeFlags(), malloc(), max_group, MergeNets(), routedata::mtspace, mtspace_add(), NET, ODD, PCB, r_insert_entry(), SUBNET, TEST_FLAG, VIA, and VIA_SHADOW.
Referenced by TracePath().
static void RemoveFromNet | ( | routebox_t * | a, |
enum boxlist | which | ||
) | [static] |
Definition at line 579 of file autoroute.c.
References __select_list(), routebox_list::next, and routebox_list::prev.
Referenced by AutoRoute(), and RouteAll().
static void ResetSubnet | ( | routebox_t * | net | ) | [static] |
Definition at line 1336 of file autoroute.c.
References END_LOOP, LIST_LOOP, routebox::original_subnet, routebox::same_net, and routebox::same_subnet.
Referenced by CreateRouteData(), and RouteAll().
static void ripout_livedraw_obj | ( | routebox_t * | rb | ) | [static] |
Definition at line 4679 of file autoroute.c.
References PCBType::Data, DestroyObject(), LayerGroupType::Entries, EraseLine(), EraseVia(), routebox::group, layer, LAYER_PTR, PCBType::LayerGroups, routebox::line, LINE, routebox::livedraw_obj, PCB, routebox::type, routebox::via, and VIA.
Referenced by ripout_livedraw_obj_cb(), and RouteAll().
static int ripout_livedraw_obj_cb | ( | const BoxType * | b, |
void * | cl | ||
) | [static] |
Definition at line 4697 of file autoroute.c.
References box, and ripout_livedraw_obj().
Referenced by AutoRoute().
static routebox_t* route_parent | ( | routebox_t * | rb | ) | [static] |
Return a "parent" of this edge which immediately precedes it in the route.
Definition at line 1587 of file autoroute.c.
References routebox::expansion_area, EXPANSION_AREA, routebox::flags, routebox::homeless, routebox::is_thermal, routebox::is_via, routebox::parent, and routebox::type.
Referenced by CreateBridge(), CreateExpansionArea(), and nonhomeless_parent().
struct routeall_status RouteAll | ( | routedata_t * | rd | ) | [read] |
Definition at line 4734 of file autoroute.c.
References _, AutoRouteParameters, routeone_status::best_route_cost, routebox::box, calculate_progress(), routeall_status::conflict_subnets, routebox::different_net, Draw(), END_FOREACH, END_LOOP, EVEN, EXPENSIVE, routeall_status::failed, routedata::first_net, routebox::fixed, routebox::flags, FOREACH_SUBNET, routeone_status::found_route, routebox::group, gui, heap_create(), heap_destroy(), heap_insert(), heap_is_empty(), heap_remove_smallest(), heap_size(), routebox::homeless, InitAutoRouteParameters(), routebox::is_bad, routebox::is_odd, is_smoothing, RouteStyleType::Keepaway, routedata::layergrouptree, LIST_LOOP, MAKEMAX, MAKEMIN, Message(), routedata::mtspace, mtspace_add(), mtspace_remove(), NET, routeone_status::net_completely_routed, no_expansion_boxes(), ODD, OTHER, PAD, passes, PCB, PLANE, hid_st::progress, r_delete_entry(), RemoveFromNet(), ResetSubnet(), ripout_livedraw_obj(), routeall_status::ripped, ro, routeone_status::route_had_conflicts, routeall_status::routed_subnets, RouteOne(), routing_layers, routebox::same_net, routebox::same_subnet, routebox::sbox, shrink_routebox(), smoothes, routebox::style, SUBNET, routebox::subnet_processed, TEST_FLAG, routeall_status::total_nets_routed, routeall_status::total_subnets, routebox::type, VIA_SHADOW, BoxType::X1, BoxType::X2, BoxType::Y1, and BoxType::Y2.
Referenced by AutoRoute().
static struct routeone_status RouteOne | ( | routedata_t * | rd, |
routebox_t * | from, | ||
routebox_t * | to, | ||
int | max_edges | ||
) | [static, read] |
Definition at line 4070 of file autoroute.c.
References __edge_is_good(), add_or_destroy_edge(), add_via_sites(), ALL, AutoRouteParameters, routeone_state::best_cost, routeone_state::best_path, best_path_candidate(), routeone_status::best_route_cost, routeone_state::best_target, bloat_routebox(), routebox::box, box_center(), box_intersect(), box_is_good(), BreakManyEdges(), routebox::came_from, CENTER_X, CENTER_Y, clip_box(), closest_point_in_box(), routebox::conflicts_with, edge_struct::cost, routebox::cost_point, edge_struct::cost_point, CreateEdge(), CreateEdge2(), CreateEdgeWithConflicts(), CreateExpansionArea(), CreateViaEdge(), DestroyEdge(), RouteStyleType::Diameter, do_via_search(), routebox::e, EAST, edge_cost(), END_LOOP, Expand(), edge_struct::expand_dir, routebox::expansion_area, EXPANSION_AREA, EXPENSIVE, FindOneInBox(), FindThermable(), routebox::fixed, edge_struct::flags, routebox::flags, routeone_status::found_route, routeone_via_site_state::free_space_vec, routebox::group, heap_create(), heap_destroy(), heap_free(), heap_insert(), heap_is_empty(), heap_remove_smallest(), routeone_via_site_state::hi_conflict_space_vec, routebox::homeless, E_result::inflated, routebox::is_bad, edge_struct::is_interior, is_layer_group_active, routebox::is_thermal, routebox::is_via, edge_struct::is_via, KillEdge(), routedata::layergrouptree, LIST_LOOP, routeone_via_site_state::lo_conflict_space_vec, malloc(), MAX, MergeNets(), MIN, edge_struct::mincost_target, routedata::mtspace, routeone_status::net_completely_routed, NO_CONFLICT, routebox::nobloat, routebox::nonstraight, NORTH, E_result::orig, routebox::parent, pin, PLANE, r_create_tree(), r_delete_entry(), r_destroy_tree(), r_insert_entry(), edge_struct::rb, routebox::refcount, ro, routeone_status::route_had_conflicts, s, routebox::same_net, routebox::same_subnet, routebox::sbox, shrink_routebox(), routebox::source, source_conflicts(), SOUTH, routebox::style, SUBNET, routebox::target, touch_conflicts(), routebox::touched, TracePath(), routebox::type, vector_append(), vector_create(), vector_destroy(), vector_is_empty(), vector_remove_last(), edge_struct::via_conflict_level, edge_struct::via_search, WEST, routeone_state::workheap, cheap_point::X, BoxType::X1, BoxType::X2, cheap_point::Y, BoxType::Y1, and BoxType::Y2.
Referenced by AutoRoute(), and RouteAll().
Definition at line 2062 of file autoroute.c.
References BoxType::X1, BoxType::X2, BoxType::Y1, and BoxType::Y2.
Referenced by CreateExpansionArea().
static BoxType shrink_routebox | ( | const routebox_t * | rb | ) | [inline, static] |
Definition at line 621 of file autoroute.c.
References routebox::sbox.
Referenced by add_via_sites(), CreateSearchEdge(), edge_to_box(), FindThermable(), ftherm_rect_in_reg(), IronDownAllUnfixedPaths(), point_in_shrunk_box(), RouteAll(), RouteOne(), and TracePath().
static void source_conflicts | ( | rtree_t * | tree, |
routebox_t * | rb | ||
) | [static] |
Definition at line 4052 of file autoroute.c.
References __conflict_source(), AutoRouteParameters, r_search(), routebox::sbox, and touch_conflicts().
Referenced by RouteOne().
bool TargetPoint | ( | CheapPointType * | nextpoint, |
const routebox_t * | target | ||
) |
Get to actual pins/pad target coordinates.
Definition at line 1397 of file autoroute.c.
References abs, CENTER_X, CENTER_Y, routebox::pad, PAD, routebox::parent, routebox::pin, PIN, routebox::sbox, routebox::type, pin_st::X, cheap_point::X, pin_st::Y, and cheap_point::Y.
Referenced by TracePath().
static void touch_conflicts | ( | vector_t * | conflicts, |
int | touch | ||
) | [static] |
Touch everything (except fixed) on each net found in the conflicts vector. If the vector is different from the last one touched, untouch the last batch and touch the new one. Always call with touch=1 (except for recursive call). Call with NULL, 1 to clear the last batch touched.
Touched items become invisible to current path so we don't encounter the same conflictor more than once.
Definition at line 1622 of file autoroute.c.
References END_LOOP, routebox::fixed, routebox::flags, LIST_LOOP, n, routebox::same_net, routebox::touched, vector_element(), and vector_size().
Referenced by __conflict_source(), RouteOne(), and source_conflicts().
static void TracePath | ( | routedata_t * | rd, |
routebox_t * | path, | ||
const routebox_t * | target, | ||
routebox_t * | subnet, | ||
bool | is_bad | ||
) | [static] |
This back-traces the expansion boxes along the best path it draws the lines that will make the actual path.
During refinement passes, it should try to maximize the area for other tracks so routing completion is easier.
During smoothing passes, it should try to make a better path, possibly using diagonals, etc. The path boxes are larger on average now so there is more possiblity to decide on a nice path. Any combination of lines and arcs is possible, so long as they don't poke more than half thick outside the path box.
Definition at line 3565 of file autoroute.c.
References AutoRouteParameters, routebox::box, box_in_box(), CENTER_X, CENTER_Y, routebox::circular, clip_box(), closest_point_in_box(), closest_point_in_routebox(), Draw(), EXPANSION_AREA, routebox::expansion_area, routebox::flags, hid_st::flush_debug_draw, routebox::group, gui, HALF_THICK, routebox::is_thermal, routebox::is_via, routebox::layer, MIN, routebox::parent, PCB, pcb_printf(), PIN, PLANE, point_in_box(), rb_source(), RD_DrawLine(), RD_DrawManhattanLine(), RD_DrawThermal(), RD_DrawVia(), routebox::sbox, shrink_box(), shrink_routebox(), routebox::source, routebox::style, TargetPoint(), TEST_FLAG, TRUE, routebox::type, cheap_point::X, BoxType::X1, BoxType::X2, cheap_point::Y, BoxType::Y1, and BoxType::Y2.
Referenced by RouteOne().
Definition at line 3942 of file autoroute.c.
struct { ... }
AutoRouteParameters [static] |
Referenced by __GatherBlockers(), add_via_sites(), bloat_routebox(), blocker_to_heap(), BreakManyEdges(), calculate_progress(), cost_to_layerless_box(), cost_to_point(), cost_to_point_on_layer(), cost_to_routebox(), CreateEdge2(), CreateEdgeWithConflicts(), CreateExpansionArea(), CreateRouteData(), CreateSearchEdge(), CreateViaEdge(), DestroyRouteData(), do_via_search(), Expand(), InitAutoRouteParameters(), moveable_edge(), RD_DrawLine(), RD_DrawManhattanLine(), RD_DrawThermal(), RD_DrawVia(), RouteAll(), RouteOne(), source_conflicts(), and TracePath().
Definition at line 439 of file autoroute.c.
Referenced by AddPad(), CreateRouteData(), and read_pads().
Definition at line 372 of file autoroute.c.
Referenced by __Expand_this_rect(), boink_box(), BreakManyEdges(), miter(), parse_bloat(), png_draw_line(), png_fill_circle(), png_fill_rect(), ps_fill_rect(), REGISTER_ATTRIBUTES(), and use_gc().
Definition at line 374 of file autoroute.c.
Definition at line 374 of file autoroute.c.
Definition at line 439 of file autoroute.c.
Referenced by AddPad(), CreateRouteData(), and read_pads().
int hi_conflict |
Definition at line 382 of file autoroute.c.
bool is_layer_group_active[MAX_GROUP] [static] |
Definition at line 442 of file autoroute.c.
Referenced by add_or_destroy_edge(), CreateRouteData(), do_via_search(), InitAutoRouteParameters(), IronDownAllUnfixedPaths(), RD_DrawVia(), and RouteOne().
bool is_odd |
Definition at line 386 of file autoroute.c.
bool is_smoothing |
Definition at line 390 of file autoroute.c.
Referenced by InitAutoRouteParameters(), and RouteAll().
Definition at line 374 of file autoroute.c.
bool last_smooth |
Definition at line 393 of file autoroute.c.
Definition at line 374 of file autoroute.c.
Definition at line 374 of file autoroute.c.
Referenced by InitAutoRouteParameters().
Definition at line 374 of file autoroute.c.
unsigned char pass |
Definition at line 394 of file autoroute.c.
int passes = 12 [static] |
Definition at line 445 of file autoroute.c.
Referenced by calculate_progress(), InitAutoRouteParameters(), and RouteAll().
bool rip_always |
Definition at line 392 of file autoroute.c.
int ro = 0 [static] |
Definition at line 443 of file autoroute.c.
Referenced by RouteAll(), and RouteOne().
int routing_layers = 0 [static] |
Definition at line 446 of file autoroute.c.
Referenced by CreateRouteData(), and RouteAll().
int smoothes = 1 [static] |
Definition at line 444 of file autoroute.c.
Referenced by calculate_progress(), and RouteAll().
Definition at line 370 of file autoroute.c.
Referenced by ActionSetThermal(), AddIrregularObstacle(), AddLine(), AddPad(), AddPin(), CreateNewPCB(), CreateRouteData(), dialog_style_changed_cb(), draw_crosshair(), draw_lead_user(), eps_set_line_cap(), FlagCurrentStyle(), gcode_set_line_cap(), gerber_set_line_cap(), ghid_cell_renderer_visibility_get_size(), ghid_route_style_selector_edit_dialog(), ghid_route_style_selector_install_items(), ghid_route_style_selector_select_style(), ghid_route_style_selector_sync(), ghid_set_line_cap(), ghid_violation_renderer_render(), gsvit_set_line_cap(), InitAutoRouteParameters(), lesstif_set_line_cap(), lookup_keepaway(), lookup_thickness(), nelma_set_line_cap(), netlist_create(), ParseRouteString(), png_set_line_cap(), ProcNetlist(), ps_set_line_cap(), SetRouteStyle(), style_selected(), and ThermPoly().
int total_via_count = 0 [static] |
Definition at line 448 of file autoroute.c.
Referenced by AutoRoute(), and IronDownAllUnfixedPaths().
float total_wire_length = 0 [static] |
Definition at line 447 of file autoroute.c.
Referenced by AutoRoute(), and IronDownAllUnfixedPaths().
bool use_vias |
Definition at line 384 of file autoroute.c.
bool usedGroup[MAX_GROUP] [static] |
Definition at line 440 of file autoroute.c.
Referenced by cost_to_routebox(), CreateRouteData(), and RD_DrawLine().
Definition at line 374 of file autoroute.c.
bool with_conflicts |
Definition at line 388 of file autoroute.c.
Referenced by InitAutoRouteParameters().
int x_cost[MAX_GROUP] [static] |
Definition at line 441 of file autoroute.c.
Referenced by cost_to_point_on_layer(), CreateRouteData(), and InitAutoRouteParameters().
int y_cost[MAX_GROUP] |
Definition at line 441 of file autoroute.c.
Referenced by cost_to_point_on_layer(), CreateRouteData(), and InitAutoRouteParameters().