Determining Which Via the Router Will Use
The router computes the cost of the available vias based on each via’s bounds on metal and cut layers, extension values, preferred orientation, and origin offset. A via with the smallest footprint and with longer extensions in the preferred routing direction will have the lowest cost. Vias with a lower cost are preferred for routing.
The selection of vias can be further controlled as described in the following sections:
- Advanced Via Extension Control and Selection
- Routing with Aligned Single-Cut Vias
- Routing with On-Wire Multi-Cut Vias
Advanced Via Extension Control and Selection
To further control the router’s selection of vias, you can specify preferred extension directions and origin offsets, and also save a preferred via selection order for routing.
-
Enable the use of these features by setting the
db.use_separate_pref_ext_direnvironment variable totrue.setvar db.use_separate_pref_ext_dir true
- Set constraints, as described in “Specifying Via Preferences”.
- (Optional) Customize the sorted list of valid vias, as described in “Reviewing and Changing the Sorted List of Valid Vias”.
Specifying Via Preferences
By setting the following constraints, you instruct the router to assign a lower cost to vias with your specified preferred extension direction, extension alignment, and/or origin offset.
-
preferredExtensionDirection
When this constraint is set, a via with extensions aligned to the preferredExtensionDirection of the lower and upper metal layers will have the lowest cost and will be preferred for routing over another via that has the same number of cuts and the same extension dimensions but violates this constraint. -
inlineViaPreferred
By setting this constraint totrue, the preference is for inline vias, with longer extensions aligned with the longer dimension of the cut bound, and will override the preferred extension direction of the upper layer. -
preferredViaOrigin
By default, the via origin does not affect the cost of a via. By setting this constraint, you can assign a preference (lower cost) to centered-at-origin vias or offset vias.
Reviewing and Changing the Sorted List of Valid Vias
To get the sorted list of valid routing vias, use get_sorted_route_via_list. The returned list will include all valid routing vias for the design rule spec (default) or a given rule spec, sorted in order of increasing cost, as seen by the router. When db.use_separate_pref_ext_dir is true, then settings for preferredExtensionDirection, inlineViaPreferred, and preferredViaOrigin constraints will be considered when determining costs, otherwise those settings are ignored.
In addition, you can explicitly set the via preference order, by setting the list of valid routing vias (validRoutingVias) to your own ordered list of valid routing vias and setting db.preserve_routing_via_order to true. When db.preserve_routing_via_order is true, the router will select vias in the order specified by the list of valid routing vias and will assume that the cost of vias appearing earlier in the list will be lower than the cost of vias appearing later, irrespective of the via dimensions or any other parameters.
Routing with Aligned Single-Cut Vias
By default, the router will use vias with extensions in the preferred routing direction for the respective metal layers. To route using single cut vias with aligned extensions in the direction of routing, set the droute.align_vias environment variable to true before detail routing.
setvar droute.align_vias true
The aligned vias must be included in the validRoutingVias constraint or created using create_derived_vias.

Routing with On-Wire Multi-Cut Vias
To prefer routing with on-wire vias, set the environment variable to true before detail routing.
setvar droute.offset_vias true
The vias must be included in the validRoutingVias constraint or created using create_derived_vias.

Related Topics
Preparing the Routing Environment
Return to top