What does magnet_placement actually require of the cells you name with -cells, and why do two seemingly reasonable -cells lists pull nothing at all?
From PDVerse PnR Interview Handbook · pdVerse Mentor Guide
Short Answer
magnet_placement declares a fixed object (a fixed macro cell, a pin of a fixed macro cell, or an I/O port) a magnet so connected standard cells get placed close to it -- best performed BEFORE standard cell placement, to improve congestion in a complex floorplan or improve timing. The key rule: cells are pulled ONLY if they form a CONTIGUOUS data path from the magnet. magnet_placement C0 -cells {C3 C4 C5} pulls NOTHING if C3/C4/C5 aren't contiguous with C0; magnet_placement C0 -cells {C3 C6 C8} also pulls nothing if that specific set isn't a contiguous data path, even though C3, C6, and C8 might each individually be reachable from C0 through some path.
Technical Explanation
- magnet_placement declares a fixed object -- a fixed macro cell, a pin of a fixed macro cell, or an I/O port -- a "magnet," pulling connected standard cells to be placed close to it.
- It is best performed BEFORE standard cell placement -- it's meant to shape where placement starts, not correct it after the fact.
- The purpose: improve congestion for a complex floorplan, or improve timing, by keeping a data path physically compact around a fixed anchor point.
- THE KEY RULE: cells named in -cells are pulled toward the magnet ONLY IF THEY FORM A CONTIGUOUS DATA PATH from the magnet -- not merely if each one is somehow reachable from the magnet through some path.
- magnet_placement C0 -cells {C3 C4 C5} pulls NOTHING -- C3/C4/C5 are not contiguous with C0 as a set.
- magnet_placement C0 -cells {C3 C6 C8} also pulls NOTHING -- despite naming real downstream cells, that specific combination is not a contiguous data path from C0.
- By contrast, magnet_placement C2 -cells {C6 C7 C8} DOES pull C6, C7, C8 toward C2 -- because that set IS a contiguous chain from C2.
- -logical_levels limits how many logic levels from the magnet get considered; -stop_by_sequential_cells/-stop_on_sequential_cells stop the tracing at sequential-cell boundaries; -only_report_magnet_cells lets you preview which cells would actually move before committing to the operation.
What To Check
- Warning sign: a magnet_placement call with -cells set to a specific list completes without error, but none of the named cells end up placed any closer to the magnet.
- Inspect: verify the named -cells set is actually a contiguous data path from the magnet, not just a set of cells that are each individually somewhere downstream of it.
- Correct: use -only_report_magnet_cells first to preview which cells the call would actually move, before committing to the real placement pull.
Command Checks & Actions
magnet_placement C0 -only_report_magnet_cellsPreviews which cells a magnet_placement call would actually pull, letting you verify the contiguous-data-path requirement is met before committing to the real placement change.
magnet_placement C2 -cells {C6 C7 C8}Pulls a verified contiguous chain of cells toward magnet C2, the documented pattern that actually succeeds.
Healthy, Suspicious & Hard-stop Results
- Expected: a magnet_placement call's -cells list is a verified contiguous data path from the magnet, and -only_report_magnet_cells confirms the expected cells before the real run.
- Investigate: a magnet_placement call with a specific -cells list completes with no error but produces no visible placement change -- check contiguity of that exact cell set before assuming a tool bug.
- Stop: magnet_placement calls are being run repeatedly with different -cells lists by trial and error, without ever using -only_report_magnet_cells to check contiguity first.
Common Mistake
The Trap: Assuming that naming any subset of downstream cells in -cells is enough to pull them toward the magnet -- the documented examples specifically show that a non-contiguous cell list (even one made entirely of real cells on the general data path) pulls NOTHING, silently, not partially.
What The Interviewer Is Testing
Whether you know the specific contiguity rule (not just that magnet_placement exists) and can predict, from a concrete -cells list, whether a call will actually move anything or silently do nothing.
Practical Example
Debug Scenario: magnet_placement C0 -cells {C3 C6 C8} is run expecting those three downstream cells to move closer to C0, but placement shows no change. Running magnet_placement C0 -only_report_magnet_cells first would have shown that this specific set isn't a contiguous data path from C0, explaining the silent no-op before it happened.
Physical Design & Planning Handbook
Master ASIC Physical Design Planning & Floorplanning
Dive into 14 comprehensive chapters covering netlist sanity, FinFET grids, macro placement, power grids, CTS, and timing budgeting.
Continue practising