• 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 Design
  3. Need skill code to find the instance orientation from V...

Stats

  • Locked Locked
  • Replies 11
  • Subscribers 126
  • Views 18703
  • Members are here 0
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Need skill code to find the instance orientation from Virtuoso

Aksalara
Aksalara over 15 years ago

Hi All,

          I have a Virtuoso layout and I would like to know the orientation of each instance in the design. I need to find out if its MX or MY or R0 or R180, R90, etc..

[I searched in this forus some info is available on the orientation, but couldn't get to the correct one.]

Appreciate your help in this regard.

Thanks.

Ramanath 

 

 

 

  • Cancel
  • Aksalara
    Aksalara over 15 years ago

    Found some useful code (excerpt from this forum), please give your comments:

    ####################### 

    let( ( wrOrient)

        foreach( instancepointer geGetSelectedSet( )
          unless( null( instancepointer->orient)
        wrOrient = instancepointer->orient
        case( wrOrient
          ( "R0"
            wrOrient = "R90"
          )
          ( "R90"
            wrOrient = "R180"
          )
    ################

    Also please give your suggestion on how to select all the instances.. 

     

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 15 years ago

    ; cellView in the current window
    cv=geGetEditCellView()
    foreach(inst cv~>instances
      printf("Instance %s has orientation %s\n" inst~>name inst~>orient)
    )

    I'll leave it to you to put in whatever code you want to check - your requirements weren't clear beyond that.

    Regards,

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • dmay
    dmay over 15 years ago

    cv = geGetEditCellView()
    foreach(inst cv~>instances
        case(inst~>objType
            ("inst"
                printf("Inst: %s of %s is oriented %s\n" inst~>name inst~>cellName inst~>orient )
            )
            ("mosaicInst"
                printf("MosaicInst: %s of %s is oriented %s\n" inst~>name inst~>cellName car(inst~>mosaic~>tileArray))
            )
            (t
                printf("Unrecognized instance objType: %L\n" inst~>objType
            )
        )
    )

    The code above gets the instances from the cellview attribute called instances: geGetEditCellView()~>instances

    The code in your second post works from the selected set: geGetSelectedSet()

    If you are working in Cadence 5.1.41, the above code should be all you need. If you are working in Cadence 6.1.x, there are additional objects like vias that will have an orient, but will not be found from the instances attribute. The object type will also be something like "stdVia" or "customVia". If this orientation is important, you would need to loop through cv~>vias.

    Derek

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Aksalara
    Aksalara over 15 years ago

    Thank you so much Anrews and Derek.

    In my case I have the gdsii and the techFile, so based on these two data, how should i execute the code given above to get the instance name the corresponding orientation value.

    Appreciate your quick reply.

    Thanks once again,

    Ramanath

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Aksalara
    Aksalara over 15 years ago

    Also please mention how to direct the output to a specific file?

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 15 years ago

    If you don't know what to do given a GDS file and a techFile, then it seems odd that you're asking for SKILL code to find the orientation information? Not sure what you're actually trying to achieve here. After all, if the data comes from GDS, the instance names will be pretty meaningless (stream format does not record instance names).

    First you'd need to do File->Import->Stream and import the GDS file (specify the tech file too) and generate a library containing the design.

    Then open the top level cellView in a window, and use code similar to that shown before.

    I'll base it around Derek's code:

    cv = geGetEditCellView()
    fp=outfile("report.txt")
    foreach(inst cv~>instances
        case(inst~>objType
            ("inst"
                fprintf(fp "Inst: %s of %s is oriented %s\n" inst~>name inst~>cellName inst~>orient )
            )
            ("mosaicInst"
                fprintf(fp "MosaicInst: %s of %s is oriented %s\n" inst~>name inst~>cellName car(inst~>mosaic~>tileArray))
            )
            (t
                fprintf(fp "Unrecognized instance objType: %L\n" inst~>objType
            )
        )
    )
    close(fp)

    Regards,

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Aksalara
    Aksalara over 15 years ago

    Hi Andrews,

                       The time to create and open a cell view from gdsii & techfile in Virtuoso takes around 30 min, when operating with GB databases.. So, I want to know if there is a method so that the cell creation and view opening can be avoided..

    Anyway, thanks for the script update and it works fine (one bracket is missing and I corrected it at my end).

    Thanks in advance.

    Ramanath

     

     

     

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • aplumb
    aplumb over 15 years ago
    Try using 'strmin' from the command-line. That's what I always use to automate (via Makefile) my stream-in of large data.

    Then at least you have the option of logging into a big machine via SSH and running with '-64' for extra breathing room.

    Andrew.
    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • dmay
    dmay over 15 years ago

    You requested "skill code to find the instance orientation from Virtuoso", yet it sounds like you want to get the orientation from the gdsii file. Reading gdsii and running Skill code in Virtuosos are two very different tasks. If you wish to read the gdsii, I suggest you do a Google search  on GDSII syntax. I know there is a Perl module on CPAN for reading GDSII. Nonetheless, this forum is not the right place for what you are looking for.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Aksalara
    Aksalara over 15 years ago

    Hi All,

               I will look into streamIn to automate this.

    Anyway, thank you so much for your replies and please close this issue/ticket as the solution has been found.

    Regards, 

    Ramanath

     

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
>

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.

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

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