BeginnerQuestion 105 of 127Source: Synopsys ICC2 Implementation User Guide: Routing

What is preferred routing direction, and why do layers alternate?

From PDVerse PnR Interview Handbook · pdVerse Mentor Guide

Short Answer

Each metal layer has a preferred direction, horizontal or vertical, and the router keeps most wires on that layer running that way. Adjacent layers alternate direction so a horizontal wire on one layer never blocks a vertical wire on the next; they cross using a via. Wrong-way segments are legal but expensive, because they block tracks that other nets need.

Technical Reference DiagramWhat is preferred routing direction, and why do layers alternate?
A layer stack from M1 to M5 with horizontal and vertical direction arrows alternating, and one wrong-way jog on M3 called out.

Technical Explanation

  • In an HVH stack, M1 is horizontal, M2 vertical, M3 horizontal, and so on. VHV starts the other way. Most standard cell libraries are built for HVH.
  • Alternating directions makes routing a clean grid. A net goes horizontally on one layer, drops through a via and continues vertically on the next. Two wires on the same layer running the same direction never need to cross.
  • A wrong-way segment, for example a short vertical jog on a horizontal layer, cuts across several horizontal tracks at once. Every track it crosses is lost to other nets in that spot, so the router gives wrong-way routing a high cost.
  • VHV can give better area results when more than six metal layers are available, with shorter wire lengths and fewer vias. The choice is made with the library and technology, not per block.
  • The preferred direction normally comes from the cell library. You can override it for the current block with the routing_direction attribute on a layer.
  • In a region, a routing guide made with create_routing_guide and -switch_preferred_direction overrides the layer direction inside its boundary. This is sometimes used over macros to reduce detours.
  • Direction affects capacity. Horizontal capacity in a GCell comes only from the horizontal layers, so a block with more horizontal demand needs enough horizontal layers or it will congest in one direction only. The congestion report splits overflow into horizontal and vertical for this reason: the fix for a horizontal shortage is different from the fix for a vertical one.

Common Mistake

The Trap: Allowing lots of wrong-way routing to "use the empty layer". An engineer sees spare vertical capacity on M3 and lets the router jog there, but each jog blocks several horizontal M3 tracks. Local DRCs rise and the congestion simply moves. Wrong-way routing suits short pin escapes; it does not relieve a channel.

Follow-up Question & Model Response

"If a block is congested only in the horizontal direction, what are your options?"

Candidate Model Response: First confirm it is real demand and not tracks lost to PG straps on the horizontal layers. Then look at whether pins or cells can be spread to reduce local horizontal demand, for example with cell padding or lower density in that area. If the upper horizontal layers have room, you can raise the max routing layer or guide long nets upward. Switching direction locally with a routing guide is possible but trades one direction's capacity for the other, so it only helps when the vertical side has slack.

Practical Example

Tapeout Scenario: A block uses M1 to M6 in HVH order (illustrative), so M1, M3 and M5 are horizontal and M2, M4 and M6 are vertical. A net leaves a pin on M1, rises through a via to M2, runs 30 um vertically, rises to M3 and runs 45 um horizontally. At one point the router adds a 0.4 um vertical jog on M3 to dodge a neighbour. That jog crosses 3 horizontal M3 tracks. It is legal, but those 3 tracks are now unusable at that x location, which is why the router tries to avoid it. If the same net had instead dropped to M2 for the jog, it would have added two vias but blocked only one vertical M2 track. The router weighs via cost against blocked tracks for every jog it makes. Many wrong-way jogs in one area after routing usually point to local crowding.

PnR Flow Mentor Guide

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.

PnR Flow Physical Design Mentor Guide — eight chaptersPnR Flow Mentor GuideEight chapters, library setup through to stream-out. →