This describes the commands and rule settings that can be added to a router command file, which controls the strategy and rules that the router obeys.
The File Format
The file used is ASCII created in a program such as Notepad, with the file extension .do.
An Example .do File
Below is an example of a basic .do strategy file. Any text after a ’#’ character is commented out and not executed.
The adaptive routing strategy method generally requires many routing passes and involves selection of the right commands to build the best strategy.
#==============
# BASIC DO file
#==============
# Phase 1 - Initial
#------------------
bus diagonal
fanout 5
# Phase 2
#------------------
route 20
clean 2
# Phase 3
#------------------
route 25 16
clean 2
# Phase 4
#------------------
filter 5
# Phase 5 - Final
#------------------
recorner diagonal
status_file
Using this file
Available from: Tools menu > Advanced router option > User Defined button Browse
Notations
The commands take the format of command names with optional parameters and sub-command names. The description of the commands use control characters which define the syntax.
[] = option
| = OR
{} = parameter inside can appear multiple times
<> = includes a descriptor
bus
bus [ diagonal ]
Invokes a bus routing pass only on regular array of pins with collinear connections where the pins share a common X or Y coordinate. This is particularly effective on memory arrays. In this mode the router will not generate conflicts, so rules must allow for sufficient space. By default tracks are routed orthogonally, unless the diagonal option is specified.
circuit
circuit [class <class_id> | net <net_id> ] { <circuit_descriptor> }
Used to schedule the routing order priorities, specific vias to be used and allowed routing layers amongst nets and net classes.
<class_id> ::= Net Class Name.
<net_id> ::= Net Name.
<circuit_descriptor> ::= [ (priority <positive_integer> ) | (use_via { <padstack_id> } ) | (use_layer { <layer_id> } ) ]
<padstack_id> ::= Pad Style Name.
<layer_id> ::= Layer Name.
The value of priority ranges from 0 to 255, the default is 10.
The use_via rule assigns one or more via padstacks to a class or a net. If more than one padstack is defined, the autorouter will favour the smallest padstack in size.
The use_layer rule assigns routing layers where nets and classes must be routed. Note that the use_layer rule will override a layer unselection rule.
Examples :
circuit net Gnd (use_layer Top)
circuit class Power (use_layer Bottom)
circuit net Gnd (priority 200)
clean
clean [
] The clean command reroutes all the connections with higher cost settings and helps achieve
- Track optimisation with minimum corners
- Via minimisation
- Less off-centre SMD pad entry
- Exit SMD pad on long edge
cost
cost <cost_type> [ <cost_descriptors> |[ (type [length|way]) ] -1]]
User adjustable routing costs. This command sets the internally defined costs to a fixed value. By default, some of the values get internally modified during autorouting. It is not recommended to change cross and squeeze costing specifically.
Cost values can range from 0 to 100. A value of -1 will reset the cost value. Predefined cost description values can be used :- forbidden (100), high (50), medium (25), low (8) and free (0).
The following costs can be set:
- cross crossing conflict
- squeeze via to track clearance conflict
- via cost of adding vias
- way cost of routing in non preferred layer direction
- off_grid cost of routing off the grid
- off_center cost of entering or exiting a SMD pad off centre
- side_exit cost to exit SMD pads on long side
- layer If type is length it is cost of using the layer. If type is way it is cost of routing on a non preferred direction.
Examples:
cost layer Inner1 forbidden
cost layer Inner2 high (type way)
cost via high
direction
direction <layer_id> [horizontal | vertical | orthogonal | off]
Changes preferred routing bias by layer.
fanout
fanout [
] (direction [in_out|in|out] )]
[(pin_share [on|off] ] [(via_share [on|off])]
[ (pin_type [ active | signal | power | unused | all | single ] ) ]
[ (max_len <positive_dimension> ) �]
Autoroutes short escape tracks with a via from SMD pads. Recommended on SMD boards having more than 2 routing layers. Fanout direction can be set so that fanout vias are added inside SMD components, and/or outside. Fanout can be limited by pin type, for example pins connected to power nets only.
Examples:
fanout 5
fanout (depth opposite 2) (share_len 500)
fanout 5 (pin_type signal) (via_share on)
filter
filter [
] Removes tracks that are in conflict
grid
grid [ via <positive_value> [ <via_id> ] | wire <positive_value> [ <layer_id> ]]
<via_id>::= Via Style Name
Specifies wire and grid spacing. The grid wire command overrides the wire grid set by the grid smart command.
Examples:
grid wire 8.333
grid wire 5 layer Top
limit
limit [ cross [ <positive_integer> | -1 ] |� via [ <positive_integer> | -1 ] |� bend �[ <positive_integer> | -1 ] |� way [ <positive_integer> | -1 ] ]
The limit command sets absolute limit values to be applied to each connection. Control is provided to limit maximum allowed of intersecting tracks, number of vias per connection, number of corners, and the maximum distance of non preferred (wrong-way) routing. The range of limit for <positive_integer> is 0 through 255. You can set limit values, perform some routing passes and return to the default system values by executing a limit command with a value of -1. If you do not supply limit values, computed default values are used by the autorouter.
Examples:
limit via 2
limit way 200
limit way -1
protect
protect all wires
Prevents router from changing or deleting protected tracks, e.g. this option is useful to protect pre-routed GND and VCC nets. Note that the router is still allowed to connect to protected wires.
recorner
recorner [diagonal]
The recorner command changes 90 degree track corners to 135 degrees. It is performed on track corners exiting pins and vias, as well as corner and slanted track configuration.
route
route [
[ <start_pass> ]] This command either start a number of routing passes or restarts the router over a number of passes starting at a specific pass. When the number of completed passes (n) is less than 15, the <start_pass> should be n+1. When the number is higher than 15, the <start_pass> should be 16.
rule
rule [ pcb | layer <layer_id> | class <class_id> | net <net_id> ] { <rule_descriptors> }
Rules can be set globally (PCB) or specifically to layers, net classes or nets.
There are two categories of rules type: clearance and wiring rules as shown by the rule descriptor below.
<rule_descriptor> ::=
[ (clearance <positive_dimension> [(type {<clearance_type>} ]) |
�(junction_type [term_only|all]) |
(limit_bends [<positive_integer>|-1]) |
(limit_crossing [<positive_integer>|-1]) |
(limit_vias [<positive_integer>|-1] ) |
(limit_way [<positive_integer>| -1]) |
(max_stub [<positive_dimension> |-1]) |
(max_total_vias [<positive_integer>|-1]) |
(reorder <positive_integer>) |
( tjunction� on|off]) |
(via_at_smd [off|on [(grid [on| off] ] [ (fit [on|off])] ) |
(width <positive_dimension>) ]
<clearance_type> ::=
[ <object_type>_<object_type> |
�smd_via_same_net |
via_via_same_net |
buried_via_gap |
antipad_gap |
pad_to_turn_gap |
smd_to_turn_gap |
drill_gap ]
<object_type> ::= [ pin | smd | via | wire | area ]
Examples:
rule class Power (clearance wire_pin wire_smd 8)
select
select [{[layer|via] {
}]�| [all [layers|vias]] �| [ comp� <comp_name>}] �| �[net {<net_name>}] Enables the autorouter to use specific layers and vias for routing. Allows for selecting nets for routing.
tax
tax [ way | cross | via | off_grid | off_center | side_exit | squeeze | layer <layer_name>] [
|<positive_integer>] This is an alternative method of using the cost command. This is the recommended way to adjust costing. The tax command applies a multiplier to control internal costing. The default value for tax is 1.
Examples.
tax layer Top 1.2
tax way 1.2
tax via .5
unprotect
unprotect
Unprotect existing tracks. Allows router to reconsider them.
unselect
unselect [layer|via] {
}� | �[all [ layers|vias] Disallow the autorouter the usage of specific layers and vias for routing. The command can be used to reduce the number of routing layers than originally specified.
Example:
unselect layer Inner3 Inner4