• 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 to change end point according to new Design ...

Stats

  • Locked Locked
  • Replies 2
  • Subscribers 144
  • Views 9204
  • 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 to change end point according to new Design rule

EJAZ27
EJAZ27 over 3 years ago

a horizontal drawing layer is need to be aligned with guide as shown in figure. i want to automate it. I don t have much experience in cadence skill. you can consider me as a beginner level. it can be either done by reading guide or manually giving input how much length layer needs to be extended or pulled back.

  • Cancel
Parents
  • psill00
    psill00 over 3 years ago

    Not sure of what you want. I have not tested this but it might get you in direction to what you want.

    I was not sure it is a path or pathSeg

    define the xgrid and ygrid in the command "stuff"

    procedure(stuff(xgrid ygrid)
    let( (pts pt
    (cv geGetEditCellView())
    )
    foreach(path setof(shp cv~>shapes shp~>width)
    if(equal(path~>objType "path") then
    pts = rndPointList(path~>points xgrid ygrid)
    path~>points = pts
    else pt = rndPoint(path~>beginPt xgrid ygrid)
    path~>beginPt = pt
    pt = rndPoint(path~>endPt xgrid ygrid)
    path~>endPt = pt)
    )
    t
    )) end of stuff

    procedure(rndNum(num grid)
    let( (tmp rem)
    tmp = fix(num/grid)
    rem = float(num - tmp*grid)
    if(lessp(rem grid/2) then
    num = num-rem
    else num = num + grid - rem)
    num
    )); end of rndNum

    procedure(rndPoint(pt xGrid yGrid)
    let( (x y)
    x = rndNum(xCoord(pt) xGrid)
    y = rndNum(yCoord(pt) yGrid)
    list(x y)
    )); end of rndPoint

    procedure(rndPointList(ptList xGrid yGrid)
    let( (x y rndList)
    foreach(pt ptList
    x = rndNum(xCoord(pt) xGrid)
    y = rndNum(yCoord(pt) yGrid)
    rndList = cons(list(x y) rndList))
    rndList
    )); end of rndPointList

    Paul

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Reply
  • psill00
    psill00 over 3 years ago

    Not sure of what you want. I have not tested this but it might get you in direction to what you want.

    I was not sure it is a path or pathSeg

    define the xgrid and ygrid in the command "stuff"

    procedure(stuff(xgrid ygrid)
    let( (pts pt
    (cv geGetEditCellView())
    )
    foreach(path setof(shp cv~>shapes shp~>width)
    if(equal(path~>objType "path") then
    pts = rndPointList(path~>points xgrid ygrid)
    path~>points = pts
    else pt = rndPoint(path~>beginPt xgrid ygrid)
    path~>beginPt = pt
    pt = rndPoint(path~>endPt xgrid ygrid)
    path~>endPt = pt)
    )
    t
    )) end of stuff

    procedure(rndNum(num grid)
    let( (tmp rem)
    tmp = fix(num/grid)
    rem = float(num - tmp*grid)
    if(lessp(rem grid/2) then
    num = num-rem
    else num = num + grid - rem)
    num
    )); end of rndNum

    procedure(rndPoint(pt xGrid yGrid)
    let( (x y)
    x = rndNum(xCoord(pt) xGrid)
    y = rndNum(yCoord(pt) yGrid)
    list(x y)
    )); end of rndPoint

    procedure(rndPointList(ptList xGrid yGrid)
    let( (x y rndList)
    foreach(pt ptList
    x = rndNum(xCoord(pt) xGrid)
    y = rndNum(yCoord(pt) yGrid)
    rndList = cons(list(x y) rndList))
    rndList
    )); end of rndPointList

    Paul

    • 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