How do soft and hard net layer constraints differ?
From PDVerse PnR Interview Handbook · pdVerse Mentor Guide
Short Answer
A hard layer constraint is never broken: the router will not use a layer outside it. A soft one can be broken at a cost if that helps routing. For net-specific constraints set with set_routing_rule, the default is min layer soft and max layer hard, and you can change either default or set the mode per constraint.
Technical Explanation
- Net-specific layer constraints are set with
set_routing_ruleand its-min_routing_layerand-max_routing_layeroptions. They are separate from the block-wide limits set withset_ignored_layers. - By default the minimum layer is soft and the maximum layer is hard. That means a net can drop below its min layer when it helps, for example near a pin, but it can never go above its max layer.
- The mode can be
soft,allow_pin_connectionorhard.allow_pin_connectionlets the net break the limit to connect to pins (and, per the command reference, to fix DRCs in very congested areas), which is often the right choice for a min layer. - The defaults for all nets are changed with
route.common.net_min_layer_modeandroute.common.net_max_layer_mode. A single constraint can be changed with-min_layer_modeor-max_layer_modeonset_routing_rule. - The cost of breaking a soft constraint is
low,medium(the default) orhigh, set globally withroute.common.net_min_layer_mode_soft_costandroute.common.net_max_layer_mode_soft_cost, or per constraint. - Global min and max layers have their own mode options (
route.common.global_min_layer_modeandroute.common.global_max_layer_mode); clock layer constraints follow the net mode options.check_routabilitytreats these limits as hard only when those application options, orroute.common.net_min_layer_modeandroute.common.net_max_layer_mode, are set tohard. set_routing_rule -clearremoves net-specific layer constraints and also any NDR assigned to those nets, so use it carefully.
What To Check
- The layer constraints on critical nets and their modes.
- After routing, the length of each net that sits outside its min layer.
- Whether any net violates a hard constraint, which
check_routesreports as a min or max layer violation. - Blocked-port results from
check_routabilityfor nets with hard constraints.
Command Checks & Actions
set_routing_rule [get_nets n1] -min_routing_layer M3 -max_routing_layer M6 -min_layer_mode hardKeeps net n1 between M3 and M6, with the min layer made hard.
set_app_options -name route.common.net_min_layer_mode -value allow_pin_connectionChanges the default min layer mode for all nets so they may only go lower to reach pins.
check_routesReports minimum layer and maximum layer violations after routing.
report_wirelength -nets [get_nets n1]Shows wire length per layer for the net, so you can see how much ran below its min layer.
Healthy, Suspicious & Hard-stop Results
- Healthy (illustrative): Critical nets stay in their band except short pin connections, and
check_routesshows no layer violations. - Suspicious (illustrative): A net spending a large share of its length below a soft min layer, usually a sign of congestion on its preferred layers.
- Hard stop: A hard constraint on a net whose pins sit only on layers outside it. It cannot be routed.
Common Mistake
The Trap: Making the min layer hard on a net whose driver pin is on M1. With a hard M3 minimum, the router has no legal way to reach the pin, so the net stays open or collects DRCs at the pin. allow_pin_connection would have kept the net high while still letting it reach its pins.
What The Interviewer Is Testing
- Whether you know the default modes for net-specific constraints.
- Can you choose between soft, pin-connection and hard for a given net?
- A strong answer shows you connect hard constraints to pin access.
Follow-up Question & Model Response
"Why is the default max layer hard and the min layer soft?"
Candidate Model Response: Going above a max layer usually means using layers reserved for something else, such as power or top-level routing, which can break the whole design plan. Going below a min layer usually happens near pins, which live on low layers, and blocking that would leave nets unroutable. So the defaults protect what is reserved above and stay practical about reaching pins below.
Practical Example
Tapeout Scenario: A timing-critical net should run on M5 and M6 for low resistance (illustrative). The engineer sets -min_routing_layer M5 -max_routing_layer M6 with the default soft minimum. After routing, 40% of its 600 um sits on M3 because M5 and M6 are congested along its path, and its delay is 9 ps worse than planned. Making the min layer hard fails at the pins, which are on M1. Setting -min_layer_mode allow_pin_connection gives the right result: 94% of the length on M5 and M6, with only the pin connections below, and the net recovers 7 ps.
PnR Flow Mentor Guide
Master the Physical Design Implementation Flow
Read the complete 8-chapter PnR Flow Mentor Guide free on the web — library setup through placement, clock tree synthesis, routing, chip finishing, hierarchical implementation, and ECO, all the way to stream-out.

Continue practising