• 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. Order of let() and procedure()

Stats

  • Locked Locked
  • Replies 3
  • Subscribers 143
  • Views 14198
  • 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

Order of let() and procedure()

Michael Kolesnik
Michael Kolesnik over 4 years ago

Is there a recommended order of let() and procedure()?

I have seen it both ways:

procedure(myFunction()
let( (x y z )
...code...
);let
);procedure


let( (x y z )
procedure(myFunction()
...code...
);procedure
);let

it seems that with let() first you can have more than one procedure in the code that can share the variables defined in let()

  • Cancel
  • Andrew Beckett
    Andrew Beckett over 4 years ago

    Well, these mean different things - so it's not a matter of a recommended order. I use both depending on what I'm trying to achieve.

    The creation of functions within a let is something that only has meaning in SKILL++ mode (e.g. when you have a .ils suffix to your source file) and only then will it make the functions locally scoped within that let and share variables across the functions within the let.

    If the let is within the function, then the variables are scoped to that function, either lexically (in SKILL++ mode) or dynamically (in SKILL mode).

    This is beyond the scope of something that I can reasonably explain the full details of lexical and dynamic scoping here - it is covered in other resources elsewhere though... 

    Andrew.

    • Cancel
    • Vote Up +1 Vote Down
    • Cancel
  • Michael Kolesnik
    Michael Kolesnik over 4 years ago in reply to Andrew Beckett

    Do you have any pointers/links to the other resources?

    Are they SKILL resources or lisp resources? I did not really see any details in the SKILL User Guide

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 4 years ago in reply to Michael Kolesnik

    SKILL resources.

    I touch on it (briefly) during my video Writing Good SKILL Code and it's also in the About SKILL++ and SKILL chapter of the SKILL Language User Guide.

    This blog posts might be a useful start too:

    • SKILL for the Skilled: What is SKILL++?

    Andrew

    • 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