• 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. VI Editor Script

Stats

  • Locked Locked
  • Replies 8
  • Subscribers 143
  • Views 15080
  • 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

VI Editor Script

xv12
xv12 over 13 years ago
I am using the function dbWriteSkill to dump the layout to a file and want to modify to just stretch the length and everything contact metal implant will also stretch.
I want to use the vi editor to modify.  Does anyone have a quick way to do it. For me I have to delete one by one and it take a longtime  
Below is the partial dump file
dbD_0xcd1f768 = dbCreatePolygon(dbD_0xcc0c42c list(16 252)
 list(2.650000e+01:2.930000e+01 2.240000e+01:2.930000e+01 2.240000e+01:7.000000e+00
      7.000000e+00:7.000000e+00 7.000000e+00:2.520000e+01 2.240000e+01:2.520000e+01
      2.240000e+01:2.930000e+01 2.900000e+00:2.930000e+01 2.900000e+00:2.900000e+00
      2.650000e+01:2.900000e+00 ) )
And this is what I want to change.
 (pcLayer = 16)
 (pcPurpose = "drawing")
 (pcInst = dbCreatePolygon(pcCellView
  list(pcLayer pcPurpose)
  list((26.5:(29.3 + l_float0offset))
      (22.4:(29.3 + l_float0offset))
      (22.4:7.0)
      (7.0:7.0)
      (7.0:(25.2 + l_float0offset))
      (22.4:(25.2 + l_float0offset))
      (22.4:(29.3 + l_float0offset))
      (2.9:(29.3 + l_float0offset))
      (2.9:2.9)
      (26.5:2.9)
  )
  • Cancel
Parents
  • dmay
    dmay over 13 years ago

    Why would you want to do it this way? The Skill language is sufficient to be able to adjust all those coordinate values without you having to dump a text file, edit that text file in vi and then reload it. If you can explain more clearly what you wish to do with the layout (rather than explaining the odd methodology), I'm sure someone on this forum can help you.

    Which shapes do you want to modify? ("everything contact metal implant" is a little unclear)
    How do you want to modify them? ("stretch the length" - are you wanting to stretch all in the y direction by l_float0offset?)

    foreach(shp geGetEditCellView()~>shapes
      when(member(shp~>layerName list("contact" "metal" "implant))
        case(shp~>objType
          ("polygon"
            newPtList=nil
            foreach(pt shp~>points
              do something with the point and build a new point list
            )
            shp~>points=newPtList
          )
          ("rect"
            adjust the bbox
            shp~>bBox = bBox
          )
          ("path"
            newPtList=nil
            foreach(pt shp~>points
              do something with the point and build a new point list
            )
            shp~>points=newPtList
          )
          (t
            printf("Found %s objType and did not adjust it\n" shp~>objType)
          )
        )
      )
    )

    Derek

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Reply
  • dmay
    dmay over 13 years ago

    Why would you want to do it this way? The Skill language is sufficient to be able to adjust all those coordinate values without you having to dump a text file, edit that text file in vi and then reload it. If you can explain more clearly what you wish to do with the layout (rather than explaining the odd methodology), I'm sure someone on this forum can help you.

    Which shapes do you want to modify? ("everything contact metal implant" is a little unclear)
    How do you want to modify them? ("stretch the length" - are you wanting to stretch all in the y direction by l_float0offset?)

    foreach(shp geGetEditCellView()~>shapes
      when(member(shp~>layerName list("contact" "metal" "implant))
        case(shp~>objType
          ("polygon"
            newPtList=nil
            foreach(pt shp~>points
              do something with the point and build a new point list
            )
            shp~>points=newPtList
          )
          ("rect"
            adjust the bbox
            shp~>bBox = bBox
          )
          ("path"
            newPtList=nil
            foreach(pt shp~>points
              do something with the point and build a new point list
            )
            shp~>points=newPtList
          )
          (t
            printf("Found %s objType and did not adjust it\n" shp~>objType)
          )
        )
      )
    )

    Derek

    • Cancel
    • Vote Up 0 Vote Down
    • 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.

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

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