OpenROAD icon indicating copy to clipboard operation
OpenROAD copied to clipboard

DRT: resolve conflicts between frInst::getTransform and frInst::getUpdatedXform

Open osamahammad21 opened this issue 1 year ago • 6 comments

Description

The code in DRT keeps fluctuating between the use of getTransform and getUpdatedXform. getTransform cannot be applied directly to the master shapes as its offset is not the correct transform offset. In my opinion, getTransform is always wrong and useless, however some parts of the code get away with using it.

Suggested Solution

No response

Additional Context

No response

osamahammad21 avatar Sep 09 '24 14:09 osamahammad21

So the idea is to convert the code to always use getUpdatedXform and remove getTransform at the end?

titan73 avatar Sep 09 '24 15:09 titan73

What is the goal of getUpdatedXform? I'm used to seeing people use getTransform across hierarchies. Why do you think it is wrong?

maliberty avatar Sep 09 '24 18:09 maliberty

getUpdatedXform returns the correct transform that should be applied to the master shapes. However, getTransform returns a wrong one, because its origin point is not the actual origin point but the lower left point of the instance. I am still managing to understand how it is used correctly.

osamahammad21 avatar Sep 10 '24 10:09 osamahammad21

Is the transform different from what you would get in DEF for the instance?

maliberty avatar Sep 10 '24 15:09 maliberty

yes, thus the need for getUpdateXform.

osamahammad21 avatar Sep 10 '24 15:09 osamahammad21

getUpdatedXform is pretty ugly. Can we just use the normal transform and avoid all this? I'm concerned about how much of an impact it might have but haven't scoped it myself.

maliberty avatar Sep 10 '24 16:09 maliberty