TraceMaker
C++ API of the engine
Loading...
Searching...
No Matches
tmk::route::RouterOptions Struct Reference

#include <route/router.hpp>

Classes

struct  Bus
 Buses (doc 05 §38): groups of nets routed lane by lane. More...
struct  GuidePath
 Path guidance (doc 16 F1): a preferred path for a connection, found by matching its two pad centres. More...
struct  AdviceSet
 Hints from an advice file (src/advice, doc 17). More...

Public Attributes

Coord pitch = 0
 lattice pitch; 0 = automatic from net-class widths and clearances
double pitch_scale_small = 1.0
 Auto pitch multiplier on small lattices (< 1M points per layer): a finer lattice finds fan-outs the default one misses and small boards have the time for it (doc 05 §25).
bool fine_variant = true
 portfolio: the cheap-vias variant routes small boards at half pitch
double pitch_scale = 1.0
 auto pitch multiplier, applied only on large lattices (>= 3M points per layer)
double time_limit_s = 120
 wall-clock safety limit for the whole run
bool halving = false
 Portfolio with more variants than threads: successive halving (Jamieson and Talwalkar, AISTATS 2016) instead of running only threads variants.
long work_budget = 0
 deterministic budget in search expansions (0 = none): same input + seed => same output
long max_expansions = 3'000'000
 Per search attempt.
bool reach_verify = false
 test only: run the A* even where the pre-check proved no path, count mismatches
int reach_check = 1
 flood-fill reachability check before strict searches (exact): 0 off, 1 likely failures, 2 all
bool bend_states = true
 direction in the A* state (exact bend costs) vs. parent-direction approximation
double heuristic_weight = 1.0
bool soft_zones = false
 Plane-aware routing of all-SMD boards (doc 05 §26), all opt-in:
bool via_in_pad = false
 inner balls / enclosed SMD pads may take a minimum-size via in the pad
bool vias_off_pads = false
 vias keep clear of SMD pads narrower than vias_off_pads_below_mm (except via-in-pad)
double vias_off_pads_below_mm = 2.0
bool field_heuristic = true
 GPU cost-to-go field as the A* heuristic on large windows.
int field_min_cells = 60'000
 window size (lattice points x layers) from which the field is used
int gpu_device = 0
 GPU backend device for fields (-1 = CPU reference).
int max_attempts = 4
 per connection (window growth and learned blocks between attempts)
int soft_attempts = 3
 window sizes tried by negotiated searches
double via_cost_mm = 3.0
 equivalent track length of one via
bool allow_vias = true
double polish_fraction = 0
 share of the budget reserved for rebuilding the open connections of the best state (doc 16)
int polish_trials = 20
 seeded orders tried per open connection in the polish
int lns_open_trials = 0
 regional rebuild of open connections: seeded orders tried per open connection (0 = off, doc 16 F4)
double lns_open_radius_mm = 2.5
 copper within this distance of the open connection's first pad is lifted
double layer_dir_pen = -1
 negative = automatic (-1: 0.3; otherwise the strength is the absolute value) on breakout boards only, else 0; extra cost (pitches per orthogonal step) against a layer's preferred direction: even layers horizontal, odd vertical (doc 16)
bool layer_dir_swap = false
 preferred directions the other way round: even layers vertical, odd horizontal
double package_pen = -1
 -1 = automatic (3 on a two-layer board with a ball-grid package, else 0); pitches per lattice step for tracks on the pad layer inside a ball-grid package (doc 16 F3; 0 = off)
bool layer_assign_angle = false
 layer preference by chord direction instead of by crossings (uses layer_assign_pen)
bool layer_assign = false
 doc 16 F2: prefer, per connection, the layer that leaves the fewest crossings (two-layer boards)
double layer_assign_pen = 0.4
 pitches per lattice step on the other layer
bool strict_first = true
 the first pass is strict (no crossing of routed copper); off: negotiate from the first pass
bool rip_up = true
 negotiated rip-up and reroute (design doc 05 §6 rung R2, doc 06 §3)
double history_weight = 2.0
 PathFinder history: pitches of cost per recorded conflict on a cell.
int max_victims = 0
 a negotiated route may rip at most this many connections at once (0 = no limit)
double txn_temp = -1
 transactional negotiation: a route that loses k connections net is kept with probability exp(-k / txn_temp) (0 = never, -1 = automatic: 1.5 on a breakout board)
int txn_cool = 0
 1: the temperature falls linearly to zero over the work budget (simulated-annealing schedule)
int stall_passes = 0
 > 0: a restart begins when this many passes in a row set no new best for the run since its last restart
long txn_cap = 0
 transactional negotiation: expansion cap of each victim's re-route search (0 = none)
int txn_depth = 0
 transactional negotiation: victims that cannot be re-routed strictly get a nested transaction of their own, this deep
int txn_nested = 4
 nested transactions allowed per top-level transaction
int field_cache_mb = 0
 > 0: cost-to-go fields are kept (this many MB per router) and reused when every input is identical; results are unchanged
int flood_work_pct = 100
 reachability-flood cells count this percent of an expansion against the work budget (a flood cell costs far less time)
int field_prefill = 0
 1: fill a class's fixed-copper cache for the whole board before its first field, so fields depend on nothing learned later (and can be cached)
int tidy = 0
 > 0: every this many passes, with connections still open, each routed connection is re-routed alone and kept if shorter (frees room)
int txn_orders = 1
 transactional negotiation: orders tried for re-routing the victims (the ones that failed go first in the next try)
int breakout_profile = 1
 1: a breakout board (D98) also gets reach_check 2, flood_work_pct 25, field prefill and cache (when those are at their defaults)
const std::vector< ConnRoute > * warm = nullptr
 start from these routes (a previous result's conn_routes): they are kept, negotiation starts at once
std::string state_out
 portfolio: after every round the best routes so far are written here (atomically), so an interrupted or out-of-time run can be resumed
std::string state_in
 portfolio: start from the routes saved in this file (written by state_out); a missing file is ignored
bool relax_late = false
 with relax: plain rounds under the board's rules first; when they stall, start the stages afresh (not from the stalled state), and keep the best legal result of all
bool relax = false
 portfolio: relax, route, legalise: ramp stages at 60 % and 80 % of the board's clearance with legalisation and breathing between (D104); needs round_work (20 M by default)
double ramp_from_mm = 0
 portfolio: > 0 starts at this clearance (every class and the board minimum lowered by the difference) and raises it by ramp_step_mm per stage up to the board's own; each stage warm-starts from the last one's routes that are still legal (clearance continuation, doc 16 §12.3)
double ramp_step_mm = 0.005
 clearance added per stage
int ramp_rounds = 2
 a ramp stage ends after this many rounds in a row without gain over the best round of the stage (or when complete)
int ramp_cycle = 0
 > 0: when the final stage (the board's rules) has not improved for ramp_stall rounds, go back this many stages and climb again ("breathing"); the best result under the board's rules is returned
bool ramp_late = false
 start at the board's rules and use the ramp (with ramp_cycle) only once those stall
int ramp_fresh = 0
 > 0: every n-th breathing cycle starts from nothing instead of the best state (a new topology; the best result under the board's rules is kept)
int ramp_stall = 3
 rounds without improvement at the final stage before breathing
int island_slack = -1
 portfolio rounds: >= 0 lets every variant continue the next round from its own final state when that routes at least (best - island_slack) connections, instead of all from the best (islands; the best state ever seen is returned)
bool keep_final = false
 also return the live state at the end of the run (RouteResult::final_routes)
std::vector< model::Track > warm_tracks
 copper of a routed board (–warm-pcb) to start from: a net with one connection takes all of its tracks and vias; only what is legal under this board's rules is kept
std::vector< model::Via > warm_vias
double legalize_subdivide_mm = 0
 > 0 with legalize: route tracks are cut into pieces of at most this length so they can bend (route/legalize.hpp)
bool legalize = false
 warm start: first move the vertices of the taken-over routes until the board's clearances hold (route/legalize.hpp), then keep what is legal
bool state_recheck = false
 warm start: take over only the routes that are legal under this board's rules (continuation from looser rules)
int breakout_portfolio = 1
 1: with more than one variant, a board that looks like a ball-grid breakout gets the breakout portfolio (D101) instead of the designed eight
long round_work = 0
 portfolio: > 0 gives every round this work budget (instead of splitting the total), and rounds continue until the board is complete, rounds is reached or time_limit_s of the whole portfolio is used (–until-complete)
int rounds = 0
 portfolio: the work budget is split into this many rounds; after each, every variant continues from the best result so far (0 = automatic: 4 with the breakout portfolio, else 1)
int txn = -1
 transactional negotiation (doc 16 §12): a route that rips victims is kept only if the victims can be re-routed without ripping: 0 = off, 1 = keep ties (net 0), 2 = strict gain only, -1 = automatic (1 on a breakout board, else 0)
int max_rips_per_connection = 40
 was 8: at 50 M work on dense breakouts 33 % -> 54 % clean (doc 16 §4)
int max_passes = 40
 passes over still-unrouted connections (was 12)
bool micro_vias = false
 Micro vias (outer layer to the next one, the net class's microvia size) where a through via is blocked, on boards whose rules allow them (doc 05 §21).
bool blind_vias = false
 use blind/buried vias where a through via is blocked, if the board allows them
bool diff_pairs = false
 route P/N pairs together as coupled tracks first (falls back to single routing)
std::vector< std::pair< model::NetId, model::NetId > > pair_nets
 Component rules (doc 15 P3): these net pairs only are routed coupled first when diff_pairs is off (e.g.
bool pair_twists = true
 Intra-pair skew limit for pairs routed coupled (0 = only KiCad custom skew rules): the shorter half gets meanders in the clean-up until the halves differ by at most half of it (length tuning code, doc 05 §15).
Coord pair_skew = 0
std::vector< Coord > pair_net_skew
 Per-pair limits for RouterOptions::pair_nets (same index; 0 or missing = pair_skew): component rules give each interface its own limit (USB 2.0 1.27 mm, doc 15 USB2-02).
bool global_route = false
 plan every connection on a coarse tile graph first; detailed search follows the corridors
bool global_confine = false
 Global router v2 (M6): the first search of each connection is confined to its corridor (cells outside are blocked, window cropped to the corridor); only if that fails do the usual unconfined windows run.
bool global_strict_corridor_only = false
 Strict pass with corridors: a connection that cannot be routed inside its corridor goes straight to negotiation instead of flooding the wide strict windows (on logicbone those failed floods were 76 % of all search expansions; doc 05 §13).
bool global_congestion = false
 Global congestion map (M6, doc 05 §16): plan on the tile graph, then charge detailed steps through tiles the plan fills beyond global_congestion_from eighths of capacity, except near the connection's own ends.
int global_congestion_from = 6
double global_congestion_pen = 0.5
 pitches per lattice step, per eighth of capacity above the threshold
bool plan_gap = true
 Connection planning measures pad copper to pad copper instead of centre to centre (doc 05 §17).
bool optimize = true
 post-routing clean-up: re-route connections to save vias and length
bool escape_plan = false
 reserve escape corridors for the pins of dense packages (route/escape.hpp, M9)
double escape_length_mm = 0
 Corridors of the review of the EtherCAT shield (reports/realworld/ethercat_qfn_analysis.md, doc 05 §47). All off by default: no change without them.
bool escape_stubs = false
 with the escape plan: a pin offers the end of its (long, straight) corridor as a start point, reached by one exact off-lattice segment at a discount: parallel escapes at the pad pitch, which the lattice cannot draw
bool soft_mask_graphics = false
 net-less solder-mask openings drawn as footprint graphics (solder jumpers, MEMS microphones) do not keep tracks and vias out; KiCad flags what lies in them
bool soft_copper_graphics = false
 board copper graphics (polygons on a copper layer) take the net of the pads, tracks and vias of the one net they touch (a manual pour), so that net's pins inside are not enclosed and no other net may touch them
bool via_drops = false
 pins of dense packages may drop to a via 0.7-1.5 mm out, off the lattice, between the neighbours' tracks (the designer's supply vias), then go on on the other layer
bool bundle_escape = false
 doc 05 §50: the connections that leave one side of a dense package for one side of another part are placed first as a block of parallel straight lanes in pin order (route/bundle.hpp); the rest is routed as usual and may not rip the lanes
int bundle_min_lanes = 3
 fewer connections than this in a group are left to the ordinary router
bool package_tunnels = false
 doc 05 §52: a connection between two perimeter pins of one dense package on one net gets a stub and a via at each pin and its run between them on the other layer (the core rail's tunnel under the package), placed before the search
bool supply_first = false
 doc 05 §51: nets with 2+ perimeter pins on one dense package (supply and core nets: +3V3, a core rail) and no pour are routed before everything else and may not be ripped (as –first-nets); the bundles of –bundle-escape are still placed first (placing them after the supply nets was worse: 20 against 13 unrouted on the EtherCAT shield)
bool escape_persist = false
 a ripped-up connection gets its pins' corridors back; a corridor is kept while the net has other open connections at that package
bool radial_supply = false
 spanning tree: no edge between two pins of one dense package for a net with 3+ pins there (each pin goes to a capacitor or via; the trunk forms outside the escape band)
double radial_penalty_mm = 10
 what such an edge costs in the spanning tree
bool escape_second_ring = false
 second-ring balls escape between two outer balls instead of by dog-bone
bool escape_flow = false
 Escape planning version 2 (route/escape_flow.hpp): deep ball-grid arrays get min-cost-flow channel and layer assignment; other dense packages keep version 1's corridors.
bool cut_report = false
 R6 cut proofs (doc 05 §20): measure every straight line across the board (capacity past fixed copper against the nets that must cross) and fill RouteResult::over_cuts / tightest_cut.
bool escape_report = false
 fill RouteResult::escape_rings (pins of deep arrays per ring, and how many connected)
int max_restarts = 6
 full restarts (hardest first, history kept) when negotiation stalls
double soft_growth = 0.0
 crossing cost grows by this fraction of soft_cost_mm per negotiation pass (PathFinder, doc 16)
double soft_cost_mm = 1.0
 base cost of crossing another net's routed copper (before history)
std::uint64_t seed = 1
int order = 0
 connection order: 0 shortest first, 1 longest first, 2 shortest first with seeded jitter
std::vector< std::pair< std::string, std::string > > priority
 Connections to route first ("REF.NUM" pairs, either orientation): learned from earlier failures (doc 06 T3).
std::vector< std::string > first_nets
 routed first, also after restarts; other nets do not rip them (crystal lines)
bool first_nets_ordered = false
 route the –first-nets in the order of the list (default: the router's own order within the group)
std::vector< std::string > no_neck_nets
 Nets that are never narrowed below their class width nor given the neck-down via (power nets in a rule-relaxed routing: they have the least margin, so the relaxation is spent on signals only).
std::vector< Bus > buses
bool bus_first = false
 the groups' connections before all others (after first_nets), also after restarts
std::vector< GuidePath > guides
double guide_pen = 0.1
 pitches per lattice step off the guide
double guide_radius = 1.5
 pitches around the guide that count as on it
std::string only_net
 debugging: route only this net
bool plan_only = false
 Plan the connections and stop: RouteResult::connections and ::unrouted list every connection that is open (reason not_attempted), nothing is searched or committed.
std::vector< std::string > skip_nets
 experiments: leave these nets unrouted (e.g.
model::LayerMask no_track_layers = 0
 Layer limits (doc 05 §29; route/layer_limits.hpp turns layer names into these).
std::vector< std::int32_t > layer_cost_pm
std::vector< std::pair< std::string, int > > critical
 Critical nets (issue #24, doc 05 §44; route_job fills these from –critical-nets and the component rules' roles).
bool critical_first = false
double critical_via_mult = 1.0
double split_cost = 0
bool split_hard = false
double split_min_coverage = 0.3
 a layer is a reference plane when its zone fills cover this share of the board
std::shared_ptr< const model::Board > reference_fills
 The board with its zones refilled by the engine, for the reference map: made once by the caller when the file's zones have no fills (every portfolio variant would otherwise refill the whole board itself).
std::vector< model::Zone > extra_zones
 Rule areas and custom rules that exist only in this router's working copy of the board and rules (advice regions, doc 17 §4): never written to the output, judged by the same exact checks as the board's own positional rules (doc 05 §34).
std::vector< model::CustomRule > extra_rules
struct tmk::route::RouterOptions::AdviceSet advice
events::Sink * sink = nullptr
std::atomic< double > * deadline = nullptr
 Shared by portfolio variants (wall-clock mode only): when one variant has routed everything at time T, the others may continue until 2T + 5 s; a variant that is complete always finishes its clean-up.
bool buffer_events = false
 Recording: every variant buffers its events and only the winning variant's are forwarded to sink (each message gains a leading "t" field, seconds since that variant started).

Detailed Description

Definition at line 27 of file router.hpp.

Member Data Documentation

◆ advice

struct tmk::route::RouterOptions::AdviceSet tmk::route::RouterOptions::advice

◆ allow_vias

bool tmk::route::RouterOptions::allow_vias = true

Definition at line 60 of file router.hpp.

◆ bend_states

bool tmk::route::RouterOptions::bend_states = true

direction in the A* state (exact bend costs) vs. parent-direction approximation

Definition at line 47 of file router.hpp.

◆ blind_vias

bool tmk::route::RouterOptions::blind_vias = false

use blind/buried vias where a through via is blocked, if the board allows them

Definition at line 116 of file router.hpp.

◆ breakout_portfolio

int tmk::route::RouterOptions::breakout_portfolio = 1

1: with more than one variant, a board that looks like a ball-grid breakout gets the breakout portfolio (D101) instead of the designed eight

Definition at line 106 of file router.hpp.

◆ breakout_profile

int tmk::route::RouterOptions::breakout_profile = 1

1: a breakout board (D98) also gets reach_check 2, flood_work_pct 25, field prefill and cache (when those are at their defaults)

Definition at line 86 of file router.hpp.

◆ buffer_events

bool tmk::route::RouterOptions::buffer_events = false

Recording: every variant buffers its events and only the winning variant's are forwarded to sink (each message gains a leading "t" field, seconds since that variant started).

Definition at line 256 of file router.hpp.

◆ bundle_escape

bool tmk::route::RouterOptions::bundle_escape = false

doc 05 §50: the connections that leave one side of a dense package for one side of another part are placed first as a block of parallel straight lanes in pin order (route/bundle.hpp); the rest is routed as usual and may not rip the lanes

Definition at line 153 of file router.hpp.

◆ bundle_min_lanes

int tmk::route::RouterOptions::bundle_min_lanes = 3

fewer connections than this in a group are left to the ordinary router

Definition at line 154 of file router.hpp.

◆ bus_first

bool tmk::route::RouterOptions::bus_first = false

the groups' connections before all others (after first_nets), also after restarts

Definition at line 190 of file router.hpp.

◆ buses

std::vector<Bus> tmk::route::RouterOptions::buses

Definition at line 189 of file router.hpp.

◆ critical

std::vector<std::pair<std::string, int> > tmk::route::RouterOptions::critical

Critical nets (issue #24, doc 05 §44; route_job fills these from –critical-nets and the component rules' roles).

critical is net name and tier (1 = most critical). With critical_first they are routed before all other nets, tier by tier (after first_nets), also after restarts. A via costs them critical_via_mult times as much (>= 1). A track of theirs over a void of the adjacent reference plane (route/ref_map.hpp) costs split_cost pitches more per lattice step; split_hard closes those cells to them instead. All off by default: a run without these options is the run it was.

Definition at line 220 of file router.hpp.

◆ critical_first

bool tmk::route::RouterOptions::critical_first = false

Definition at line 221 of file router.hpp.

◆ critical_via_mult

double tmk::route::RouterOptions::critical_via_mult = 1.0

Definition at line 222 of file router.hpp.

◆ cut_report

bool tmk::route::RouterOptions::cut_report = false

R6 cut proofs (doc 05 §20): measure every straight line across the board (capacity past fixed copper against the nets that must cross) and fill RouteResult::over_cuts / tightest_cut.

Costs the global router's set-up.

Definition at line 166 of file router.hpp.

◆ deadline

std::atomic<double>* tmk::route::RouterOptions::deadline = nullptr

Shared by portfolio variants (wall-clock mode only): when one variant has routed everything at time T, the others may continue until 2T + 5 s; a variant that is complete always finishes its clean-up.

Definition at line 253 of file router.hpp.

◆ diff_pairs

bool tmk::route::RouterOptions::diff_pairs = false

route P/N pairs together as coupled tracks first (falls back to single routing)

Definition at line 117 of file router.hpp.

◆ escape_flow

bool tmk::route::RouterOptions::escape_flow = false

Escape planning version 2 (route/escape_flow.hpp): deep ball-grid arrays get min-cost-flow channel and layer assignment; other dense packages keep version 1's corridors.

Implies escape_plan.

Definition at line 163 of file router.hpp.

◆ escape_length_mm

double tmk::route::RouterOptions::escape_length_mm = 0

Corridors of the review of the EtherCAT shield (reports/realworld/ethercat_qfn_analysis.md, doc 05 §47). All off by default: no change without them.

> 0: perimeter corridors run this far past the package edge (2 mm by default), as far as no fixed copper is in the way (bundles of parallel straight escapes)

Definition at line 148 of file router.hpp.

◆ escape_persist

bool tmk::route::RouterOptions::escape_persist = false

a ripped-up connection gets its pins' corridors back; a corridor is kept while the net has other open connections at that package

Definition at line 157 of file router.hpp.

◆ escape_plan

bool tmk::route::RouterOptions::escape_plan = false

reserve escape corridors for the pins of dense packages (route/escape.hpp, M9)

Definition at line 146 of file router.hpp.

◆ escape_report

bool tmk::route::RouterOptions::escape_report = false

fill RouteResult::escape_rings (pins of deep arrays per ring, and how many connected)

Definition at line 167 of file router.hpp.

◆ escape_second_ring

bool tmk::route::RouterOptions::escape_second_ring = false

second-ring balls escape between two outer balls instead of by dog-bone

Definition at line 160 of file router.hpp.

◆ escape_stubs

bool tmk::route::RouterOptions::escape_stubs = false

with the escape plan: a pin offers the end of its (long, straight) corridor as a start point, reached by one exact off-lattice segment at a discount: parallel escapes at the pad pitch, which the lattice cannot draw

Definition at line 149 of file router.hpp.

◆ extra_rules

std::vector<model::CustomRule> tmk::route::RouterOptions::extra_rules

Definition at line 232 of file router.hpp.

◆ extra_zones

std::vector<model::Zone> tmk::route::RouterOptions::extra_zones

Rule areas and custom rules that exist only in this router's working copy of the board and rules (advice regions, doc 17 §4): never written to the output, judged by the same exact checks as the board's own positional rules (doc 05 §34).

Definition at line 231 of file router.hpp.

◆ field_cache_mb

int tmk::route::RouterOptions::field_cache_mb = 0

> 0: cost-to-go fields are kept (this many MB per router) and reused when every input is identical; results are unchanged

Definition at line 81 of file router.hpp.

◆ field_heuristic

bool tmk::route::RouterOptions::field_heuristic = true

GPU cost-to-go field as the A* heuristic on large windows.

Definition at line 54 of file router.hpp.

◆ field_min_cells

int tmk::route::RouterOptions::field_min_cells = 60'000

window size (lattice points x layers) from which the field is used

Definition at line 55 of file router.hpp.

◆ field_prefill

int tmk::route::RouterOptions::field_prefill = 0

1: fill a class's fixed-copper cache for the whole board before its first field, so fields depend on nothing learned later (and can be cached)

Definition at line 83 of file router.hpp.

◆ fine_variant

bool tmk::route::RouterOptions::fine_variant = true

portfolio: the cheap-vias variant routes small boards at half pitch

Definition at line 32 of file router.hpp.

◆ first_nets

std::vector<std::string> tmk::route::RouterOptions::first_nets

routed first, also after restarts; other nets do not rip them (crystal lines)

Definition at line 175 of file router.hpp.

◆ first_nets_ordered

bool tmk::route::RouterOptions::first_nets_ordered = false

route the –first-nets in the order of the list (default: the router's own order within the group)

Definition at line 176 of file router.hpp.

◆ flood_work_pct

int tmk::route::RouterOptions::flood_work_pct = 100

reachability-flood cells count this percent of an expansion against the work budget (a flood cell costs far less time)

Definition at line 82 of file router.hpp.

◆ global_confine

bool tmk::route::RouterOptions::global_confine = false

Global router v2 (M6): the first search of each connection is confined to its corridor (cells outside are blocked, window cropped to the corridor); only if that fails do the usual unconfined windows run.

Definition at line 133 of file router.hpp.

◆ global_congestion

bool tmk::route::RouterOptions::global_congestion = false

Global congestion map (M6, doc 05 §16): plan on the tile graph, then charge detailed steps through tiles the plan fills beyond global_congestion_from eighths of capacity, except near the connection's own ends.

No corridors.

Definition at line 140 of file router.hpp.

◆ global_congestion_from

int tmk::route::RouterOptions::global_congestion_from = 6

Definition at line 141 of file router.hpp.

◆ global_congestion_pen

double tmk::route::RouterOptions::global_congestion_pen = 0.5

pitches per lattice step, per eighth of capacity above the threshold

Definition at line 142 of file router.hpp.

◆ global_route

bool tmk::route::RouterOptions::global_route = false

plan every connection on a coarse tile graph first; detailed search follows the corridors

Definition at line 130 of file router.hpp.

◆ global_strict_corridor_only

bool tmk::route::RouterOptions::global_strict_corridor_only = false

Strict pass with corridors: a connection that cannot be routed inside its corridor goes straight to negotiation instead of flooding the wide strict windows (on logicbone those failed floods were 76 % of all search expansions; doc 05 §13).

Definition at line 137 of file router.hpp.

◆ gpu_device

int tmk::route::RouterOptions::gpu_device = 0

GPU backend device for fields (-1 = CPU reference).

Definition at line 56 of file router.hpp.

◆ guide_pen

double tmk::route::RouterOptions::guide_pen = 0.1

pitches per lattice step off the guide

Definition at line 202 of file router.hpp.

◆ guide_radius

double tmk::route::RouterOptions::guide_radius = 1.5

pitches around the guide that count as on it

Definition at line 203 of file router.hpp.

◆ guides

std::vector<GuidePath> tmk::route::RouterOptions::guides

Definition at line 201 of file router.hpp.

◆ halving

bool tmk::route::RouterOptions::halving = false

Portfolio with more variants than threads: successive halving (Jamieson and Talwalkar, AISTATS 2016) instead of running only threads variants.

Every variant runs on a small budget, the better half runs again on twice as much, until threads variants are left; each rung takes an equal share of the wall time (or work) that threads variants would have used. Runs restart from scratch at each rung (a router run cannot be resumed).

Definition at line 39 of file router.hpp.

◆ heuristic_weight

double tmk::route::RouterOptions::heuristic_weight = 1.0

Definition at line 48 of file router.hpp.

◆ history_weight

double tmk::route::RouterOptions::history_weight = 2.0

PathFinder history: pitches of cost per recorded conflict on a cell.

Definition at line 73 of file router.hpp.

◆ island_slack

int tmk::route::RouterOptions::island_slack = -1

portfolio rounds: >= 0 lets every variant continue the next round from its own final state when that routes at least (best - island_slack) connections, instead of all from the best (islands; the best state ever seen is returned)

Definition at line 99 of file router.hpp.

◆ keep_final

bool tmk::route::RouterOptions::keep_final = false

also return the live state at the end of the run (RouteResult::final_routes)

Definition at line 100 of file router.hpp.

◆ layer_assign

bool tmk::route::RouterOptions::layer_assign = false

doc 16 F2: prefer, per connection, the layer that leaves the fewest crossings (two-layer boards)

Definition at line 69 of file router.hpp.

◆ layer_assign_angle

bool tmk::route::RouterOptions::layer_assign_angle = false

layer preference by chord direction instead of by crossings (uses layer_assign_pen)

Definition at line 68 of file router.hpp.

◆ layer_assign_pen

double tmk::route::RouterOptions::layer_assign_pen = 0.4

pitches per lattice step on the other layer

Definition at line 70 of file router.hpp.

◆ layer_cost_pm

std::vector<std::int32_t> tmk::route::RouterOptions::layer_cost_pm

Definition at line 214 of file router.hpp.

◆ layer_dir_pen

double tmk::route::RouterOptions::layer_dir_pen = -1

negative = automatic (-1: 0.3; otherwise the strength is the absolute value) on breakout boards only, else 0; extra cost (pitches per orthogonal step) against a layer's preferred direction: even layers horizontal, odd vertical (doc 16)

Definition at line 65 of file router.hpp.

◆ layer_dir_swap

bool tmk::route::RouterOptions::layer_dir_swap = false

preferred directions the other way round: even layers vertical, odd horizontal

Definition at line 66 of file router.hpp.

◆ legalize

bool tmk::route::RouterOptions::legalize = false

warm start: first move the vertices of the taken-over routes until the board's clearances hold (route/legalize.hpp), then keep what is legal

Definition at line 104 of file router.hpp.

◆ legalize_subdivide_mm

double tmk::route::RouterOptions::legalize_subdivide_mm = 0

> 0 with legalize: route tracks are cut into pieces of at most this length so they can bend (route/legalize.hpp)

Definition at line 103 of file router.hpp.

◆ lns_open_radius_mm

double tmk::route::RouterOptions::lns_open_radius_mm = 2.5

copper within this distance of the open connection's first pad is lifted

Definition at line 64 of file router.hpp.

◆ lns_open_trials

int tmk::route::RouterOptions::lns_open_trials = 0

regional rebuild of open connections: seeded orders tried per open connection (0 = off, doc 16 F4)

Definition at line 63 of file router.hpp.

◆ max_attempts

int tmk::route::RouterOptions::max_attempts = 4

per connection (window growth and learned blocks between attempts)

Definition at line 57 of file router.hpp.

◆ max_expansions

long tmk::route::RouterOptions::max_expansions = 3'000'000

Per search attempt.

One variant at a fixed budget prefers 1M (10 hard boards: 3M / 2M / 1M / 750k / 500k routed 8,285 / 8,309 / 8,381 / 8,371 / 8,363), but the 8-variant 120 s tiers did not confirm it (tier B 5,167 -> 5,161, tier C 9,523 -> 9,512 and 63.3 % -> 60.0 % clean), so it stays 3M (doc 05 §13; –max-expansions to experiment).

Definition at line 44 of file router.hpp.

◆ max_passes

int tmk::route::RouterOptions::max_passes = 40

passes over still-unrouted connections (was 12)

Definition at line 112 of file router.hpp.

◆ max_restarts

int tmk::route::RouterOptions::max_restarts = 6

full restarts (hardest first, history kept) when negotiation stalls

Definition at line 168 of file router.hpp.

◆ max_rips_per_connection

int tmk::route::RouterOptions::max_rips_per_connection = 40

was 8: at 50 M work on dense breakouts 33 % -> 54 % clean (doc 16 §4)

Definition at line 111 of file router.hpp.

◆ max_victims

int tmk::route::RouterOptions::max_victims = 0

a negotiated route may rip at most this many connections at once (0 = no limit)

Definition at line 74 of file router.hpp.

◆ micro_vias

bool tmk::route::RouterOptions::micro_vias = false

Micro vias (outer layer to the next one, the net class's microvia size) where a through via is blocked, on boards whose rules allow them (doc 05 §21).

Definition at line 115 of file router.hpp.

◆ no_neck_nets

std::vector<std::string> tmk::route::RouterOptions::no_neck_nets

Nets that are never narrowed below their class width nor given the neck-down via (power nets in a rule-relaxed routing: they have the least margin, so the relaxation is spent on signals only).

Empty = every net may be necked down.

Definition at line 179 of file router.hpp.

◆ no_track_layers

model::LayerMask tmk::route::RouterOptions::no_track_layers = 0

Layer limits (doc 05 §29; route/layer_limits.hpp turns layer names into these).

Layers in no_track_layers get no new tracks: vias still pass through them and still connect into zone fills there, and pads that exist only on such layers stay unrouted. layer_cost_pm[l] is the cost of a track on copper layer l per mille of its length (1000 = normal, never less; missing entries are 1000).

Definition at line 213 of file router.hpp.

◆ only_net

std::string tmk::route::RouterOptions::only_net

debugging: route only this net

Definition at line 204 of file router.hpp.

◆ optimize

bool tmk::route::RouterOptions::optimize = true

post-routing clean-up: re-route connections to save vias and length

Definition at line 145 of file router.hpp.

◆ order

int tmk::route::RouterOptions::order = 0

connection order: 0 shortest first, 1 longest first, 2 shortest first with seeded jitter

Definition at line 172 of file router.hpp.

◆ package_pen

double tmk::route::RouterOptions::package_pen = -1

-1 = automatic (3 on a two-layer board with a ball-grid package, else 0); pitches per lattice step for tracks on the pad layer inside a ball-grid package (doc 16 F3; 0 = off)

Definition at line 67 of file router.hpp.

◆ package_tunnels

bool tmk::route::RouterOptions::package_tunnels = false

doc 05 §52: a connection between two perimeter pins of one dense package on one net gets a stub and a via at each pin and its run between them on the other layer (the core rail's tunnel under the package), placed before the search

Definition at line 155 of file router.hpp.

◆ pair_net_skew

std::vector<Coord> tmk::route::RouterOptions::pair_net_skew

Per-pair limits for RouterOptions::pair_nets (same index; 0 or missing = pair_skew): component rules give each interface its own limit (USB 2.0 1.27 mm, doc 15 USB2-02).

Definition at line 129 of file router.hpp.

◆ pair_nets

std::vector<std::pair<model::NetId, model::NetId> > tmk::route::RouterOptions::pair_nets

Component rules (doc 15 P3): these net pairs only are routed coupled first when diff_pairs is off (e.g.

USB 2.0 D+/D- bound by tm::crules, whose names need not end in P/N or +/-). Empty = none.

Definition at line 120 of file router.hpp.

◆ pair_skew

Coord tmk::route::RouterOptions::pair_skew = 0

Definition at line 126 of file router.hpp.

◆ pair_twists

bool tmk::route::RouterOptions::pair_twists = true

Intra-pair skew limit for pairs routed coupled (0 = only KiCad custom skew rules): the shorter half gets meanders in the clean-up until the halves differ by at most half of it (length tuning code, doc 05 §15).

Coupled pairs may twist: change layer one half after the other and cross in between, so that a pair whose pin order is mirrored between its ends can still be routed coupled (doc 05 §24).

Definition at line 125 of file router.hpp.

◆ pitch

Coord tmk::route::RouterOptions::pitch = 0

lattice pitch; 0 = automatic from net-class widths and clearances

Definition at line 28 of file router.hpp.

◆ pitch_scale

double tmk::route::RouterOptions::pitch_scale = 1.0

auto pitch multiplier, applied only on large lattices (>= 3M points per layer)

Definition at line 33 of file router.hpp.

◆ pitch_scale_small

double tmk::route::RouterOptions::pitch_scale_small = 1.0

Auto pitch multiplier on small lattices (< 1M points per layer): a finer lattice finds fan-outs the default one misses and small boards have the time for it (doc 05 §25).

Definition at line 31 of file router.hpp.

◆ plan_gap

bool tmk::route::RouterOptions::plan_gap = true

Connection planning measures pad copper to pad copper instead of centre to centre (doc 05 §17).

Definition at line 144 of file router.hpp.

◆ plan_only

bool tmk::route::RouterOptions::plan_only = false

Plan the connections and stop: RouteResult::connections and ::unrouted list every connection that is open (reason not_attempted), nothing is searched or committed.

A board session (doc 19) lists the open connections of a state this way. Off by default: a run is what it was.

Definition at line 207 of file router.hpp.

◆ polish_fraction

double tmk::route::RouterOptions::polish_fraction = 0

share of the budget reserved for rebuilding the open connections of the best state (doc 16)

Definition at line 61 of file router.hpp.

◆ polish_trials

int tmk::route::RouterOptions::polish_trials = 20

seeded orders tried per open connection in the polish

Definition at line 62 of file router.hpp.

◆ priority

std::vector<std::pair<std::string, std::string> > tmk::route::RouterOptions::priority

Connections to route first ("REF.NUM" pairs, either orientation): learned from earlier failures (doc 06 T3).

Definition at line 174 of file router.hpp.

◆ radial_penalty_mm

double tmk::route::RouterOptions::radial_penalty_mm = 10

what such an edge costs in the spanning tree

Definition at line 159 of file router.hpp.

◆ radial_supply

bool tmk::route::RouterOptions::radial_supply = false

spanning tree: no edge between two pins of one dense package for a net with 3+ pins there (each pin goes to a capacitor or via; the trunk forms outside the escape band)

Definition at line 158 of file router.hpp.

◆ ramp_cycle

int tmk::route::RouterOptions::ramp_cycle = 0

> 0: when the final stage (the board's rules) has not improved for ramp_stall rounds, go back this many stages and climb again ("breathing"); the best result under the board's rules is returned

Definition at line 95 of file router.hpp.

◆ ramp_fresh

int tmk::route::RouterOptions::ramp_fresh = 0

> 0: every n-th breathing cycle starts from nothing instead of the best state (a new topology; the best result under the board's rules is kept)

Definition at line 97 of file router.hpp.

◆ ramp_from_mm

double tmk::route::RouterOptions::ramp_from_mm = 0

portfolio: > 0 starts at this clearance (every class and the board minimum lowered by the difference) and raises it by ramp_step_mm per stage up to the board's own; each stage warm-starts from the last one's routes that are still legal (clearance continuation, doc 16 §12.3)

Definition at line 92 of file router.hpp.

◆ ramp_late

bool tmk::route::RouterOptions::ramp_late = false

start at the board's rules and use the ramp (with ramp_cycle) only once those stall

Definition at line 96 of file router.hpp.

◆ ramp_rounds

int tmk::route::RouterOptions::ramp_rounds = 2

a ramp stage ends after this many rounds in a row without gain over the best round of the stage (or when complete)

Definition at line 94 of file router.hpp.

◆ ramp_stall

int tmk::route::RouterOptions::ramp_stall = 3

rounds without improvement at the final stage before breathing

Definition at line 98 of file router.hpp.

◆ ramp_step_mm

double tmk::route::RouterOptions::ramp_step_mm = 0.005

clearance added per stage

Definition at line 93 of file router.hpp.

◆ reach_check

int tmk::route::RouterOptions::reach_check = 1

flood-fill reachability check before strict searches (exact): 0 off, 1 likely failures, 2 all

Definition at line 46 of file router.hpp.

◆ reach_verify

bool tmk::route::RouterOptions::reach_verify = false

test only: run the A* even where the pre-check proved no path, count mismatches

Definition at line 45 of file router.hpp.

◆ reference_fills

std::shared_ptr<const model::Board> tmk::route::RouterOptions::reference_fills

The board with its zones refilled by the engine, for the reference map: made once by the caller when the file's zones have no fills (every portfolio variant would otherwise refill the whole board itself).

Null = use the board's own fills, refilling here if it has none.

Definition at line 228 of file router.hpp.

◆ relax

bool tmk::route::RouterOptions::relax = false

portfolio: relax, route, legalise: ramp stages at 60 % and 80 % of the board's clearance with legalisation and breathing between (D104); needs round_work (20 M by default)

Definition at line 91 of file router.hpp.

◆ relax_late

bool tmk::route::RouterOptions::relax_late = false

with relax: plain rounds under the board's rules first; when they stall, start the stages afresh (not from the stalled state), and keep the best legal result of all

Definition at line 90 of file router.hpp.

◆ rip_up

bool tmk::route::RouterOptions::rip_up = true

negotiated rip-up and reroute (design doc 05 §6 rung R2, doc 06 §3)

Definition at line 72 of file router.hpp.

◆ round_work

long tmk::route::RouterOptions::round_work = 0

portfolio: > 0 gives every round this work budget (instead of splitting the total), and rounds continue until the board is complete, rounds is reached or time_limit_s of the whole portfolio is used (–until-complete)

Definition at line 107 of file router.hpp.

◆ rounds

int tmk::route::RouterOptions::rounds = 0

portfolio: the work budget is split into this many rounds; after each, every variant continues from the best result so far (0 = automatic: 4 with the breakout portfolio, else 1)

Definition at line 108 of file router.hpp.

◆ seed

std::uint64_t tmk::route::RouterOptions::seed = 1

Definition at line 171 of file router.hpp.

◆ sink

events::Sink* tmk::route::RouterOptions::sink = nullptr

Definition at line 250 of file router.hpp.

◆ skip_nets

std::vector<std::string> tmk::route::RouterOptions::skip_nets

experiments: leave these nets unrouted (e.g.

nets a designer would pour)

Definition at line 208 of file router.hpp.

◆ soft_attempts

int tmk::route::RouterOptions::soft_attempts = 3

window sizes tried by negotiated searches

Definition at line 58 of file router.hpp.

◆ soft_copper_graphics

bool tmk::route::RouterOptions::soft_copper_graphics = false

board copper graphics (polygons on a copper layer) take the net of the pads, tracks and vias of the one net they touch (a manual pour), so that net's pins inside are not enclosed and no other net may touch them

Definition at line 151 of file router.hpp.

◆ soft_cost_mm

double tmk::route::RouterOptions::soft_cost_mm = 1.0

base cost of crossing another net's routed copper (before history)

Definition at line 170 of file router.hpp.

◆ soft_growth

double tmk::route::RouterOptions::soft_growth = 0.0

crossing cost grows by this fraction of soft_cost_mm per negotiation pass (PathFinder, doc 16)

Definition at line 169 of file router.hpp.

◆ soft_mask_graphics

bool tmk::route::RouterOptions::soft_mask_graphics = false

net-less solder-mask openings drawn as footprint graphics (solder jumpers, MEMS microphones) do not keep tracks and vias out; KiCad flags what lies in them

Definition at line 150 of file router.hpp.

◆ soft_zones

bool tmk::route::RouterOptions::soft_zones = false

Plane-aware routing of all-SMD boards (doc 05 §26), all opt-in:

zone fills do not block other nets (refilled afterwards); unused fills become plane targets

Definition at line 50 of file router.hpp.

◆ split_cost

double tmk::route::RouterOptions::split_cost = 0

Definition at line 223 of file router.hpp.

◆ split_hard

bool tmk::route::RouterOptions::split_hard = false

Definition at line 224 of file router.hpp.

◆ split_min_coverage

double tmk::route::RouterOptions::split_min_coverage = 0.3

a layer is a reference plane when its zone fills cover this share of the board

Definition at line 225 of file router.hpp.

◆ stall_passes

int tmk::route::RouterOptions::stall_passes = 0

> 0: a restart begins when this many passes in a row set no new best for the run since its last restart

Definition at line 77 of file router.hpp.

◆ state_in

std::string tmk::route::RouterOptions::state_in

portfolio: start from the routes saved in this file (written by state_out); a missing file is ignored

Definition at line 89 of file router.hpp.

◆ state_out

std::string tmk::route::RouterOptions::state_out

portfolio: after every round the best routes so far are written here (atomically), so an interrupted or out-of-time run can be resumed

Definition at line 88 of file router.hpp.

◆ state_recheck

bool tmk::route::RouterOptions::state_recheck = false

warm start: take over only the routes that are legal under this board's rules (continuation from looser rules)

Definition at line 105 of file router.hpp.

◆ strict_first

bool tmk::route::RouterOptions::strict_first = true

the first pass is strict (no crossing of routed copper); off: negotiate from the first pass

Definition at line 71 of file router.hpp.

◆ supply_first

bool tmk::route::RouterOptions::supply_first = false

doc 05 §51: nets with 2+ perimeter pins on one dense package (supply and core nets: +3V3, a core rail) and no pour are routed before everything else and may not be ripped (as –first-nets); the bundles of –bundle-escape are still placed first (placing them after the supply nets was worse: 20 against 13 unrouted on the EtherCAT shield)

Definition at line 156 of file router.hpp.

◆ tidy

int tmk::route::RouterOptions::tidy = 0

> 0: every this many passes, with connections still open, each routed connection is re-routed alone and kept if shorter (frees room)

Definition at line 84 of file router.hpp.

◆ time_limit_s

double tmk::route::RouterOptions::time_limit_s = 120

wall-clock safety limit for the whole run

Definition at line 34 of file router.hpp.

◆ txn

int tmk::route::RouterOptions::txn = -1

transactional negotiation (doc 16 §12): a route that rips victims is kept only if the victims can be re-routed without ripping: 0 = off, 1 = keep ties (net 0), 2 = strict gain only, -1 = automatic (1 on a breakout board, else 0)

Definition at line 109 of file router.hpp.

◆ txn_cap

long tmk::route::RouterOptions::txn_cap = 0

transactional negotiation: expansion cap of each victim's re-route search (0 = none)

Definition at line 78 of file router.hpp.

◆ txn_cool

int tmk::route::RouterOptions::txn_cool = 0

1: the temperature falls linearly to zero over the work budget (simulated-annealing schedule)

Definition at line 76 of file router.hpp.

◆ txn_depth

int tmk::route::RouterOptions::txn_depth = 0

transactional negotiation: victims that cannot be re-routed strictly get a nested transaction of their own, this deep

Definition at line 79 of file router.hpp.

◆ txn_nested

int tmk::route::RouterOptions::txn_nested = 4

nested transactions allowed per top-level transaction

Definition at line 80 of file router.hpp.

◆ txn_orders

int tmk::route::RouterOptions::txn_orders = 1

transactional negotiation: orders tried for re-routing the victims (the ones that failed go first in the next try)

Definition at line 85 of file router.hpp.

◆ txn_temp

double tmk::route::RouterOptions::txn_temp = -1

transactional negotiation: a route that loses k connections net is kept with probability exp(-k / txn_temp) (0 = never, -1 = automatic: 1.5 on a breakout board)

Definition at line 75 of file router.hpp.

◆ via_cost_mm

double tmk::route::RouterOptions::via_cost_mm = 3.0

equivalent track length of one via

Definition at line 59 of file router.hpp.

◆ via_drops

bool tmk::route::RouterOptions::via_drops = false

pins of dense packages may drop to a via 0.7-1.5 mm out, off the lattice, between the neighbours' tracks (the designer's supply vias), then go on on the other layer

Definition at line 152 of file router.hpp.

◆ via_in_pad

bool tmk::route::RouterOptions::via_in_pad = false

inner balls / enclosed SMD pads may take a minimum-size via in the pad

Definition at line 51 of file router.hpp.

◆ vias_off_pads

bool tmk::route::RouterOptions::vias_off_pads = false

vias keep clear of SMD pads narrower than vias_off_pads_below_mm (except via-in-pad)

Definition at line 52 of file router.hpp.

◆ vias_off_pads_below_mm

double tmk::route::RouterOptions::vias_off_pads_below_mm = 2.0

Definition at line 53 of file router.hpp.

◆ warm

const std::vector<ConnRoute>* tmk::route::RouterOptions::warm = nullptr

start from these routes (a previous result's conn_routes): they are kept, negotiation starts at once

Definition at line 87 of file router.hpp.

◆ warm_tracks

std::vector<model::Track> tmk::route::RouterOptions::warm_tracks

copper of a routed board (–warm-pcb) to start from: a net with one connection takes all of its tracks and vias; only what is legal under this board's rules is kept

Definition at line 101 of file router.hpp.

◆ warm_vias

std::vector<model::Via> tmk::route::RouterOptions::warm_vias

Definition at line 102 of file router.hpp.

◆ work_budget

long tmk::route::RouterOptions::work_budget = 0

deterministic budget in search expansions (0 = none): same input + seed => same output

Definition at line 40 of file router.hpp.


The documentation for this struct was generated from the following file: