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

#include <app/route_job.hpp>

Public Attributes

std::string in
 input .kicad_pcb (its project files supply the design rules)
std::string out
 output .kicad_pcb; empty = do not write a board
route::RouterOptions opt
 sink is set here when viewing or recording
int threads = 8
 worker threads for the portfolio variants
int variants = 0
 Portfolio size (1 = single router).
std::string kb_path
 knowledge base file; empty = none
std::string items_out
 –emit-items file; empty = none
std::string json_out
 –json summary file; empty = none
bool view = false
 stream to the browser viewer
analysis::ReturnPathOptions return_paths
 Reference-return audit of selected nets on the routed board (issue #7, doc 05 §42): off unless a selector is given.
std::vector< std::string > critical_nets
 Critical nets (issue #24, doc 05 §44, D117): route critical signals first, give them dearer vias, keep them over solid reference copper.
bool critical_auto = false
 also the nets the component rules' roles make critical, and differential pairs
bool critical_first = false
 route them before all other nets, tier by tier
double critical_via_mult = 1
 a via costs them this many times as much
bool critical_via_given = false
 set by the command line: with si_rules, a value that was given is kept (else x3)
int critical_via_max = 0
 warn when a critical net has more vias than this (0 = no limit)
double split_cost = 0
 pitches per lattice step over a void of the reference plane
bool split_cost_given = false
 as critical_via_given (else +4 with si_rules)
bool split_hard = false
 such cells are closed to critical nets
bool si_rules = false
std::string footprint_refs
 –footprint-refs (issue #5, doc 05 §43): every footprint is checked against the datasheet land patterns of a reference library before the first track is routed; a discrepancy is an error and stops the job unless footprint_warn_only.
std::string footprint_trusted
 trusted brand list; empty = trusted_brands.txt beside the references
bool footprint_trust_all = false
bool footprint_warn_only = false
analysis::FootprintCheckOptions footprint_opt
bool view_freeze = true
 the viewer holds the scene on a routing stall (issue #8); –no-freeze says false in the board snapshot
std::string view_host
 "" = $TM_VIEW_HOST, else loopback: a viewer on any other address needs a token (issue #4, D116)
std::string view_token
 the token for a non-loopback viewer (empty = a random one)
bool view_insecure = false
 a non-loopback viewer without a token (–view-insecure)
std::string view_embed
 pages that may frame the viewer (–view-embed); empty = none
int view_port = 8766
bool hold = false
 keep serving the viewer after routing; never returns (CLI only)
std::string record
 events file for replay (ignored while viewing)
std::string component_rules = "off"
 –component-rules (doc 15 §3.5): "off" (default), "report" or "soft" (detect; write the sidecar .kicad_dru next to the output), "on" (also route with the generated keep-outs as in-memory rule areas; never written into the output board).
bool reroute = false
 –reroute: remove every unlocked track and via first and route the whole board again (locked copper, arcs and zones stay; rule 6).
std::string warm_pcb
 –warm-pcb: a routed board whose tracks and vias are the starting point (kept where legal under the input's rules; nets of one connection)
std::string rules_override
 –rules-override: user override file (JSON, doc 15 §6.3); empty = none
std::string advice
 Advice (doc 17, issue #26).
int advice_variants = 0
 –advice-variants N: advised variants (0 = the file's "variants", else 4)
std::string advisor
 –advisor CMD: a shell command that reads the stuck report on stdin and writes advice on stdout
double advisor_timeout_s = 120
 –advisor-timeout S: the advisor's time limit (its wall time is not routing work)
int advisor_rounds = 1
 –advisor-rounds N: consult again with the result of the advised run while connections are left
bool advisor_redact = false
 –advisor-redact: the report names nets and parts by alias (N1, P3); the advice is mapped back
std::string advice_out
 –advice-out FILE: where the advice that was used is saved (default: <out>.advice.json)
std::string stuck_report_out
 –stuck-report FILE: write the stuck report (of the run the advisor saw, else the final one)
bool refill_repair = true
 With soft zones: refill the zones after routing and route what the refill left unconnected (doc 05 §36).
std::vector< std::string > no_tracks_on
 –no-tracks-on / –layer-cost (doc 05 §29): copper layer names, and "LAYER=FACTOR" entries.
std::vector< std::string > layer_costs
std::vector< std::string > buses
 Buses (doc 05 §38): "NAME=PATTERN" groups (–bus), automatic detection (–buses) and the skew limit of the command-line groups in mm (–bus-skew-mm; 0 = none).
bool detect_buses = false
double bus_skew_mm = 0
bool widen_power = false
 After-route passes (doc 05 §39), all off by default.
std::vector< std::string > widen_nets
std::string stitch_vias
 –stitch-vias: "planes" (vias of a plane's net on a grid where its fills overlap on two or more layers), "return" (a plane via near each via of the signals that need a reference plane: component rules of kind reference_plane, and –stitch-return "PATTERN=PLANE_NET"), or "all".
double stitch_pitch_mm = 0
 0 = the catalogue's stitch_via_within_mm
double stitch_distance_mm = 0
 0 = the rule's stitch_via_mm, else the catalogue value
std::vector< std::string > stitch_returns
long pass_work = 2'000'000
 work budget of each pass, in exact checks (rule 5)
std::function< void(const std::string &)> log
 Progress lines (the CLI's stdout text, one line per call, no trailing newline). Empty = silent.

Detailed Description

Definition at line 17 of file route_job.hpp.

Member Data Documentation

◆ advice

std::string tmk::app::RouteJob::advice

Advice (doc 17, issue #26).

The engine never talks to a model: it reads an advice file, and an advisor (any program that turns a stuck report into an advice file) is consulted only when the deterministic route leaves connections open. –advice FILE: typed hints (src/advice/advice.hpp); advised variants run next to the unadvised ones

Definition at line 70 of file route_job.hpp.

◆ advice_out

std::string tmk::app::RouteJob::advice_out

–advice-out FILE: where the advice that was used is saved (default: <out>.advice.json)

Definition at line 76 of file route_job.hpp.

◆ advice_variants

int tmk::app::RouteJob::advice_variants = 0

–advice-variants N: advised variants (0 = the file's "variants", else 4)

Definition at line 71 of file route_job.hpp.

◆ advisor

std::string tmk::app::RouteJob::advisor

–advisor CMD: a shell command that reads the stuck report on stdin and writes advice on stdout

Definition at line 72 of file route_job.hpp.

◆ advisor_redact

bool tmk::app::RouteJob::advisor_redact = false

–advisor-redact: the report names nets and parts by alias (N1, P3); the advice is mapped back

Definition at line 75 of file route_job.hpp.

◆ advisor_rounds

int tmk::app::RouteJob::advisor_rounds = 1

–advisor-rounds N: consult again with the result of the advised run while connections are left

Definition at line 74 of file route_job.hpp.

◆ advisor_timeout_s

double tmk::app::RouteJob::advisor_timeout_s = 120

–advisor-timeout S: the advisor's time limit (its wall time is not routing work)

Definition at line 73 of file route_job.hpp.

◆ bus_skew_mm

double tmk::app::RouteJob::bus_skew_mm = 0

Definition at line 88 of file route_job.hpp.

◆ buses

std::vector<std::string> tmk::app::RouteJob::buses

Buses (doc 05 §38): "NAME=PATTERN" groups (–bus), automatic detection (–buses) and the skew limit of the command-line groups in mm (–bus-skew-mm; 0 = none).

A custom skew rule of the board wins over the option.

Definition at line 86 of file route_job.hpp.

◆ component_rules

std::string tmk::app::RouteJob::component_rules = "off"

–component-rules (doc 15 §3.5): "off" (default), "report" or "soft" (detect; write the sidecar .kicad_dru next to the output), "on" (also route with the generated keep-outs as in-memory rule areas; never written into the output board).

Definition at line 62 of file route_job.hpp.

◆ critical_auto

bool tmk::app::RouteJob::critical_auto = false

also the nets the component rules' roles make critical, and differential pairs

Definition at line 35 of file route_job.hpp.

◆ critical_first

bool tmk::app::RouteJob::critical_first = false

route them before all other nets, tier by tier

Definition at line 36 of file route_job.hpp.

◆ critical_nets

std::vector<std::string> tmk::app::RouteJob::critical_nets

Critical nets (issue #24, doc 05 §44, D117): route critical signals first, give them dearer vias, keep them over solid reference copper.

Off unless asked; si_rules turns the three on with the settings below unless they were given. KiCad wildcards: nets that are critical whatever their role (tier 1)

Definition at line 34 of file route_job.hpp.

◆ critical_via_given

bool tmk::app::RouteJob::critical_via_given = false

set by the command line: with si_rules, a value that was given is kept (else x3)

Definition at line 38 of file route_job.hpp.

◆ critical_via_max

int tmk::app::RouteJob::critical_via_max = 0

warn when a critical net has more vias than this (0 = no limit)

Definition at line 39 of file route_job.hpp.

◆ critical_via_mult

double tmk::app::RouteJob::critical_via_mult = 1

a via costs them this many times as much

Definition at line 37 of file route_job.hpp.

◆ detect_buses

bool tmk::app::RouteJob::detect_buses = false

Definition at line 87 of file route_job.hpp.

◆ footprint_opt

analysis::FootprintCheckOptions tmk::app::RouteJob::footprint_opt

Definition at line 50 of file route_job.hpp.

◆ footprint_refs

std::string tmk::app::RouteJob::footprint_refs

–footprint-refs (issue #5, doc 05 §43): every footprint is checked against the datasheet land patterns of a reference library before the first track is routed; a discrepancy is an error and stops the job unless footprint_warn_only.

the library: a directory or a JSON file; empty = no check

Definition at line 46 of file route_job.hpp.

◆ footprint_trust_all

bool tmk::app::RouteJob::footprint_trust_all = false

Definition at line 48 of file route_job.hpp.

◆ footprint_trusted

std::string tmk::app::RouteJob::footprint_trusted

trusted brand list; empty = trusted_brands.txt beside the references

Definition at line 47 of file route_job.hpp.

◆ footprint_warn_only

bool tmk::app::RouteJob::footprint_warn_only = false

Definition at line 49 of file route_job.hpp.

◆ hold

bool tmk::app::RouteJob::hold = false

keep serving the viewer after routing; never returns (CLI only)

Definition at line 57 of file route_job.hpp.

◆ in

std::string tmk::app::RouteJob::in

input .kicad_pcb (its project files supply the design rules)

Definition at line 18 of file route_job.hpp.

◆ items_out

std::string tmk::app::RouteJob::items_out

–emit-items file; empty = none

Definition at line 26 of file route_job.hpp.

◆ json_out

std::string tmk::app::RouteJob::json_out

–json summary file; empty = none

Definition at line 27 of file route_job.hpp.

◆ kb_path

std::string tmk::app::RouteJob::kb_path

knowledge base file; empty = none

Definition at line 25 of file route_job.hpp.

◆ layer_costs

std::vector<std::string> tmk::app::RouteJob::layer_costs

Definition at line 83 of file route_job.hpp.

◆ log

std::function<void(const std::string&)> tmk::app::RouteJob::log

Progress lines (the CLI's stdout text, one line per call, no trailing newline). Empty = silent.

Definition at line 104 of file route_job.hpp.

◆ no_tracks_on

std::vector<std::string> tmk::app::RouteJob::no_tracks_on

–no-tracks-on / –layer-cost (doc 05 §29): copper layer names, and "LAYER=FACTOR" entries.

Resolved against the board into opt.no_track_layers / opt.layer_cost_pm; an unknown layer or a bad factor throws.

Definition at line 82 of file route_job.hpp.

◆ opt

route::RouterOptions tmk::app::RouteJob::opt

sink is set here when viewing or recording

Definition at line 20 of file route_job.hpp.

◆ out

std::string tmk::app::RouteJob::out

output .kicad_pcb; empty = do not write a board

Definition at line 19 of file route_job.hpp.

◆ pass_work

long tmk::app::RouteJob::pass_work = 2'000'000

work budget of each pass, in exact checks (rule 5)

Definition at line 102 of file route_job.hpp.

◆ record

std::string tmk::app::RouteJob::record

events file for replay (ignored while viewing)

Definition at line 58 of file route_job.hpp.

◆ refill_repair

bool tmk::app::RouteJob::refill_repair = true

With soft zones: refill the zones after routing and route what the refill left unconnected (doc 05 §36).

Definition at line 79 of file route_job.hpp.

◆ reroute

bool tmk::app::RouteJob::reroute = false

–reroute: remove every unlocked track and via first and route the whole board again (locked copper, arcs and zones stay; rule 6).

Definition at line 65 of file route_job.hpp.

◆ return_paths

analysis::ReturnPathOptions tmk::app::RouteJob::return_paths

Reference-return audit of selected nets on the routed board (issue #7, doc 05 §42): off unless a selector is given.

Read-only; the report goes to the log and the summary, and each net's return path to the viewer.

Definition at line 31 of file route_job.hpp.

◆ rules_override

std::string tmk::app::RouteJob::rules_override

–rules-override: user override file (JSON, doc 15 §6.3); empty = none

Definition at line 67 of file route_job.hpp.

◆ si_rules

bool tmk::app::RouteJob::si_rules = false

Definition at line 43 of file route_job.hpp.

◆ split_cost

double tmk::app::RouteJob::split_cost = 0

pitches per lattice step over a void of the reference plane

Definition at line 40 of file route_job.hpp.

◆ split_cost_given

bool tmk::app::RouteJob::split_cost_given = false

as critical_via_given (else +4 with si_rules)

Definition at line 41 of file route_job.hpp.

◆ split_hard

bool tmk::app::RouteJob::split_hard = false

such cells are closed to critical nets

Definition at line 42 of file route_job.hpp.

◆ stitch_distance_mm

double tmk::app::RouteJob::stitch_distance_mm = 0

0 = the rule's stitch_via_mm, else the catalogue value

Definition at line 100 of file route_job.hpp.

◆ stitch_pitch_mm

double tmk::app::RouteJob::stitch_pitch_mm = 0

0 = the catalogue's stitch_via_within_mm

Definition at line 99 of file route_job.hpp.

◆ stitch_returns

std::vector<std::string> tmk::app::RouteJob::stitch_returns

Definition at line 101 of file route_job.hpp.

◆ stitch_vias

std::string tmk::app::RouteJob::stitch_vias

–stitch-vias: "planes" (vias of a plane's net on a grid where its fills overlap on two or more layers), "return" (a plane via near each via of the signals that need a reference plane: component rules of kind reference_plane, and –stitch-return "PATTERN=PLANE_NET"), or "all".

Empty = off.

Definition at line 98 of file route_job.hpp.

◆ stuck_report_out

std::string tmk::app::RouteJob::stuck_report_out

–stuck-report FILE: write the stuck report (of the run the advisor saw, else the final one)

Definition at line 77 of file route_job.hpp.

◆ threads

int tmk::app::RouteJob::threads = 8

worker threads for the portfolio variants

Definition at line 21 of file route_job.hpp.

◆ variants

int tmk::app::RouteJob::variants = 0

Portfolio size (1 = single router).

0 = automatic: all variants (route::portfolio_size()) with a work budget, so the output does not depend on threads (D47); otherwise threads (wall-clock mode: one variant per thread).

Definition at line 24 of file route_job.hpp.

◆ view

bool tmk::app::RouteJob::view = false

stream to the browser viewer

Definition at line 28 of file route_job.hpp.

◆ view_embed

std::string tmk::app::RouteJob::view_embed

pages that may frame the viewer (–view-embed); empty = none

Definition at line 55 of file route_job.hpp.

◆ view_freeze

bool tmk::app::RouteJob::view_freeze = true

the viewer holds the scene on a routing stall (issue #8); –no-freeze says false in the board snapshot

Definition at line 51 of file route_job.hpp.

◆ view_host

std::string tmk::app::RouteJob::view_host

"" = $TM_VIEW_HOST, else loopback: a viewer on any other address needs a token (issue #4, D116)

Definition at line 52 of file route_job.hpp.

◆ view_insecure

bool tmk::app::RouteJob::view_insecure = false

a non-loopback viewer without a token (–view-insecure)

Definition at line 54 of file route_job.hpp.

◆ view_port

int tmk::app::RouteJob::view_port = 8766

Definition at line 56 of file route_job.hpp.

◆ view_token

std::string tmk::app::RouteJob::view_token

the token for a non-loopback viewer (empty = a random one)

Definition at line 53 of file route_job.hpp.

◆ warm_pcb

std::string tmk::app::RouteJob::warm_pcb

–warm-pcb: a routed board whose tracks and vias are the starting point (kept where legal under the input's rules; nets of one connection)

Definition at line 66 of file route_job.hpp.

◆ widen_nets

std::vector<std::string> tmk::app::RouteJob::widen_nets

Definition at line 94 of file route_job.hpp.

◆ widen_power

bool tmk::app::RouteJob::widen_power = false

After-route passes (doc 05 §39), all off by default.

Each changes the new copper only through the router's exact check and is kept only if no net has more unconnected items with it than without (rule 4). –widen-power: new tracks narrower than their net class width go back up to it where there is room; nets with a target (–widen-net "PATTERN=WIDTH_MM", or a width the component rules computed) are widened towards it.

Definition at line 93 of file route_job.hpp.


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