• Skip to main content
  • Skip to search
  • Skip to footer
Cadence Home
  • This search text may be transcribed, used, stored, or accessed by our third-party service providers per our Cookie Policy and Privacy Policy.

  1. Community Forums
  2. Custom IC SKILL
  3. Obtaining Transformation Data for Shapes in Mosaics

Stats

  • Replies 1
  • Subscribers 148
  • Views 58
  • Members are here 0

Obtaining Transformation Data for Shapes in Mosaics

AK202602053355
AK202602053355 3 hours ago

Greetings,

I am writing to seek guidance regarding a technical challenge I have encountered while developing a SKILL script for layout analysis. 

Current Implementation: 

My script is designed to iterate through all elements in a cellview, specifically:

  • Top-level shapes
  • Top-level instances
  • Shapes contained within instances

For regular instances and shapes, I have successfully implemented coordinate transformation using the dBTransformBBox() function to obtain global coordinates, which is necessary since querying the bounding box of a shape inside an instance returns local coordinates. 
Technical Issue: 
The implementation functions as expected until encountering instances that have been converted to mosaics. When attempting to access the transform property of a mosaic instance (instance~>transform), the value returned is nil. This results in the following error:
dbTransformBBox: Invalid transform - nil
It appears that mosaic objects do not possess a transform parameter analogous to that of standard instances.
Objective: 
My ultimate goal is to determine the global coordinates of all shapes, including those within mosaics, in order to perform spatial analysis against a reference bounding box. 
Specific Inquiries: 
 
1) What is the appropriate methodology for obtaining transformation information for shapes and contained within mosaics?
2) Are there specific APIs designed for handling mosaic elements that would be more suitable for this application?
3) Is there an alternative approach that would be more efficient for determining spatial relationships between shapes regardless of their hierarchical position?
I have attached the relevant code segment for reference. Any assistance or direction would be greatly appreciated. 
Code Snippet: 
procedure(processInstance(inst)
    let((masterCV DenShape DenBBox globalBBox)
      masterCV = inst~>master
      foreach(shape masterCV~>shapes
      DenShape = shape~>layerName
      DenBBox = shape~>bBox
      printf("Local BBox: %L\n" DenBBox)
      globalBBox = dbTransformBBox(DenBBox inst~>transform) /*Error Causing Line*/
      printf("Instance BBox %L\n" inst~>bBox)
      printf("Shape: %s, Local BBox: %L, Global BBox: %L\n" DenShape DenBBox globalBBox)
      )
    )
)

let((cv)
    cv = dbOpenCellViewByType("Basic_Learning" "skill_scripting_practice_2" "layout" "maskLayout" "r")
    foreach(inst cv~>instances
    printf("Processing this instance. \n")
    processInstance(inst)
    )
)
 

Thank you for your consideration.

Respectfully, 

Atharv

  • Cancel
  • Sign in to reply
Parents
  • Andrew Beckett
    Andrew Beckett 2 hours ago

    Atharv,

    I do this in this recently posted code (it's in LISP syntax - hope that doesn't put you off). In that code it iterates over the instances (only processing the standard instances) and then the mosaics. For the mosaics it computes the transformation of the overall mosaic by translating to the origin, rotating, and then translating back again; it then translates the offset to each x and y in the array, and then concatenates this with the hierarchical transformation so far (as it does for standard instances). It's a bit more work, but not too difficult.

    Regards,

    Andrew

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
Reply
  • Andrew Beckett
    Andrew Beckett 2 hours ago

    Atharv,

    I do this in this recently posted code (it's in LISP syntax - hope that doesn't put you off). In that code it iterates over the instances (only processing the standard instances) and then the mosaics. For the mosaics it computes the transformation of the overall mosaic by translating to the origin, rotating, and then translating back again; it then translates the offset to each x and y in the array, and then concatenates this with the hierarchical transformation so far (as it does for standard instances). It's a bit more work, but not too difficult.

    Regards,

    Andrew

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
Children
No Data

Community Guidelines

The Cadence Design Communities support Cadence users and technologists interacting to exchange ideas, news, technical information, and best practices to solve problems and get the most from Cadence technology. The community is open to everyone, and to provide the most value, we require participants to follow our Community Guidelines that facilitate a quality exchange of ideas and information. By accessing, contributing, using or downloading any materials from the site, you agree to be bound by the full Community Guidelines.

© 2026 Cadence Design Systems, Inc. All Rights Reserved.

  • Terms of Use
  • Privacy
  • Cookie Policy
  • US Trademarks
  • Do Not Sell or Share My Personal Information