• 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. Skill code for Off Grid errors

Stats

  • Locked Locked
  • Replies 22
  • Subscribers 146
  • Views 27606
  • 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

Skill code for Off Grid errors

kashvi
kashvi over 16 years ago

Do you have a skill code to clear the off grid errors on layout?

Thanks,

-Shiva 

 

  • Cancel
  • FormerMember
    FormerMember over 13 years ago

    Could you please post here the mentioned code to correct off-grid errors? I'm unable to access this link.

    I'm using IC 6 version. 

     

    Thanks.

     

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • johnmck
    johnmck over 13 years ago

    Here is the code from CCSputRodMppOnGrid.  I don't have a copy with all the disclaimers but to summarize, you should use this at your own risk.

    procedure(CCSputRodMppOnGrid(cv rodId)

    let( (shpIds compFactor path xgrid ygrid newpath obj1)

    xgrid = ygrid = 0.005

    ;compFactor = 1 / cv~>DBUPerUU

    compFactor = 0

     

    ;; Compile a list of all MPP shapes including the master path

    shpIds=cons(rodId~>dbId rodId~>subShapes)

    ;; Find out coordinates of all the existing MPP shapes

    foreach( obj shpIds

    case( obj~>objType

    (("rect")

    path = obj~>bBox

    path = list( lowerLeft(path)

    list(xCoord(upperRight(path)) yCoord(lowerLeft(path)))

    upperRight(path)

    list(xCoord(lowerLeft(path)) yCoord(upperRight(path))))

    )

    ("path"

    /* In case of path create a dummy shape because don't want to modify the MPP shapes. And the code will be converting the path to polygon. */

    obj1=dbCopyFig(obj cv)

    obj1=dbConvertPathToPolygon(obj1)

    path=obj1~>path

    )

    ("polygon"

    path = obj~>path

    )

    ) ;case

    ;; newpath will store coordinates rounded to grid. Need to be reinitialized in every loop.

    newpath=nil

    ;; Round all the coordinates to grid

    foreach( pt path

    newpath=cons(roundCoord(pt xgrid ygrid compFactor) newpath)

    ) ;foreach

    ;; Create new shapes on the rounded coordinates

    path=newpath

    case( obj~>objType

    ("path"

    dbCreatePolygon(cv obj~>lpp path)

    dbDeleteObject(obj1)

    )

    (("rect" "polygon")

    dbCreatePolygon(cv obj~>lpp path)

    )

    ) ;case

    ) ;foreach

    ;; Delete the ROD MPP

    dbDeleteObject(rodId~>dbId)

    t

    ) ;let

    ) ;proc

     

    procedure( roundCoord( point xgrid ygrid compFactor )

    let( (x y)

    x=round((xCoord(point) + compFactor) / xgrid) * xgrid

    y=round((yCoord(point) + compFactor) / ygrid) * ygrid

    list( x y )

    ) ;let

    ) ;procedure

    • 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