BeginnerQuestion 327 of 97Source PDF page undefined

What's the difference between legalize_placement and refine_placement -- do they do the same kind of work?

From PDVerse PnR Interview Handbook · pdVerse Mentor Guide

Short Answer

legalize_placement removes cell overlap and fits the placement into the row structure, correcting illegal positions to legal ones -- a correctness operation. refine_placement is incremental placement specifically to minimize congestion (with an -effort level, default medium) -- a quality-improvement operation on an already-legal placement. They're not interchangeable: legalization fixes illegality, refinement improves an already-legal result.

Technical Reference DiagramWhat's the difference between legalize_placement and refine_placement -- do they do the same kind of work?
What's the difference between legalize_placement and refine_placement -- do they do the same kind of work?, illustrating the physical design concept.

Technical Explanation

  • legalize_placement removes cell overlap and fits the placement into the row structure -- correcting illegal positions to legal ones. This is fundamentally a CORRECTNESS operation.
  • refine_placement is incremental placement specifically to minimize congestion, with an -effort level (low/medium/high, default medium) -- a QUALITY-IMPROVEMENT operation.
  • refine_placement assumes the input is already legal; it's improving a legal placement's congestion profile, not fixing illegality.
  • -coordinates lets refine_placement scope its work to a specific region rather than the whole design.

Common Mistake

The Trap: Running refine_placement on a placement that still has illegal overlaps, expecting it to also fix legality -- refine_placement is a congestion-improvement tool for already-legal placements, not a legalization substitute.

Follow-up Question & Model Response

"Why would refine_placement need its own -effort level, when legalize_placement doesn't have the same kind of tunable effort setting?"

Candidate Model Response: Because legalization has a single correct target -- a fully legal placement, with no room for a "partial" or "lower-effort" legal result -- while congestion refinement is inherently a matter of degree, where more effort can trade more runtime for a better (but never uniquely "correct") congestion outcome.

Practical Example

Debug Scenario: A design shows both cell overlaps and high congestion after an ECO. Running legalize_placement first resolves the overlaps (a correctness fix), then refine_placement -effort high specifically targets the remaining congestion (a quality improvement) on the now-legal placement.

Physical Design & Planning Handbook

Dive into 14 comprehensive chapters covering netlist sanity, FinFET grids, macro placement, power grids, CTS, and timing budgeting.