Skip to content

Commit afb03b6

Browse files
committed
rsz: document port buffer exception in insertBufferPostProcess
Add a comment explaining why bufferInputs / bufferOutputs pass loc=nullptr on purpose: port buffers are placed near their BTerm, which can sit at the die edge outside the core, and that is by design -- they should stay adjacent to the port. Makes the `if (loc)` guard self-documenting so future readers do not wonder whether the nullptr case is a bug. Comment-only change; no behavioral diff. Signed-off-by: minjukim55 <mkim@precisioninno.com>
1 parent 056f813 commit afb03b6

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

src/rsz/src/Resizer.cc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5161,6 +5161,11 @@ void Resizer::insertBufferPostProcess(dbInst* buffer_inst,
51615161
// Clamp to core if the caller provided a target location. ODB's
51625162
// insertBuffer* already placed the instance at *loc; setLocation will
51635163
// re-place it if clamping changed the point.
5164+
//
5165+
// Port buffers (bufferInputs / bufferOutputs) intentionally pass
5166+
// loc=nullptr so we do not clamp them: they are placed near their
5167+
// BTerm location, which can sit at the die edge outside the core.
5168+
// That is by design -- port buffers should stay adjacent to the port.
51645169
if (loc) {
51655170
setLocation(buffer_inst, *loc);
51665171
}

0 commit comments

Comments
 (0)