• 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. Programming help

Stats

  • Locked Locked
  • Replies 12
  • Subscribers 143
  • Views 15819
  • 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

Programming help

blankman
blankman over 6 years ago

.

  • Cancel
Parents
  • ebecheto
    ebecheto over 6 years ago

    One example below. There are many of other possibilities.

    Regards

    M="M1"
    metals = list(list(M "drawing")
    (foreach mapcar nb linRg(1 9 1) list(M sprintf(nil "drawing%d" nb))))

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 6 years ago in reply to ebecheto

    How about:

    allLPPs=foreach(mapcar lp techFile~>lps list(lp~>name lp~>purpose))
    drawPat=pcreCompile("^drawing")
    metals=setof(lpp allLPPs car(lpp)=="M1" && pcreExecute(drawPat cadr(lpp)))

    This will find all the purposes that begin with "drawing" for M1. You can change the pattern to suit your needs.

    Regards,

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 6 years ago in reply to Andrew Beckett

    You could also have a wider approach (any purpose) and then just check the validity:

    metals=setof(lpp allLPPs car(lpp)=="M1" && techIsLPValidBase(techGetLP(techFile lpp)))

    Andrew

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • blankman
    blankman over 6 years ago in reply to Andrew Beckett

    Ok, thanks Andrew, and how would I write this then for multiple metals, say M1 M2 & M3? Brian.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • blankman
    blankman over 6 years ago in reply to blankman

    ie when using the wider approach method

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 6 years ago in reply to blankman

    metals=setof(lpp allLPPs member(car(lpp) list("M1" "M2" "M3")) && techIsLPValidBase(techGetLP(techFile lpp)))

    or:

    metalPat=pcreCompile("^M[1-3]$")
    metals=setof(lpp allLPPs pcreExecute(metalPat car(lpp)) && techIsLPValidBase(techGetLP(techFile lpp)))

    Or some combination of this and the earlier pattern-based purpose matching.

    Andrew

    • Cancel
    • Vote Up +1 Vote Down
    • Cancel
  • blankman
    blankman over 6 years ago in reply to Andrew Beckett

    /

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Reply
  • blankman
    blankman over 6 years ago in reply to Andrew Beckett

    /

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Children
  • Andrew Beckett
    Andrew Beckett over 6 years ago in reply to blankman

    Probably best to debug to see if your metals list has these purposes in or not? If using the SKILL IDE you could put a breakpoint after the metals variable has been set and then run the code and it will stop there, and then you could type "metals" (without the quotes) in the CIW to see what the variable contains? You might need to check whether techIsLPValidBase is returning t or not for that LPP. Not sure why it wouldn't given that I wouldn't expect it to appear in the palette otherwise.

    Andrew

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • blankman
    blankman over 6 years ago in reply to blankman

    Àndrew, I notice it is stopping at "fill" on all layers

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 6 years ago in reply to blankman

    To be honest, you could probably just do:

        metals = setof(lpp allLPPs member(car(lpp) list("M1" "M2")) )

    Don't bother with the valid check (if that is the problem - not sure why it would be, but worth trying).

    Andrew

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • blankman
    blankman over 6 years ago in reply to Andrew Beckett

    Andrew, yep, that did the trick, all sorted, thanks for yeer help, appreciated, Brian.

    • 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