• 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. Execute only the procedure of a program

Stats

  • Locked Locked
  • Replies 4
  • Subscribers 143
  • Views 3973
  • 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

Execute only the procedure of a program

Mabr86
Mabr86 over 1 year ago

Is it possible to only execute a specific procedure of a sub-program when opening this sub-program from the main program?

  • Cancel
  • AurelBuche
    AurelBuche over 1 year ago

    Hi,

    Your question is so vague... are you even talking about SKILL?

    An example of what you have and what you want to achieve would be welcome.

    Let's assume what you call the main program is Virtuoso and that you want to call a specific SKILL function.

    If you have a file like ~/skill/example.il which contains : 

    (defun example_procedure ()
      (info "calling `example_procedure'")
      )

    Then yes, you can load this file in Virtuoso and then call `example_procedure'.

    CIW> (load (simplifyFilename "~/skill/example.il"))
    -> t
    CIW> (example_procedure)
    calling `example_procedure'
    -> nil

    If your file is not defining functions but running code directly, this can be very dangerous, as shown in the following example :

    The file ~/skill/example.il could contain

    (deleteFile ...)

    And when loading them you might erase files.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Mabr86
    Mabr86 over 1 year ago in reply to AurelBuche

    For example...

    Content of the sub-program:

    printf("test")

    procedure(greet()

    printf("Happy Birthday")

    );end procedure

    ...

    Now, in the main program I want to call the sub program above. But just the procedure "greet()" should be executed, not the "printf(test")".

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • AurelBuche
    AurelBuche over 1 year ago in reply to Mabr86

    Then no, there is no trivial way to just define the `greet' procedure.

    That is why it is advised to write SKILL files that only define procedures (except for what you call the "main" program)

    So they can be loaded and their procedures can be called individually

    In your case, you could write a function that parses the SKILL expressions inside a given file (usually this is done using `lineread') and only evaluate the S-expressions starting with `defun' or `procedure' but I would advise you not to do so as this is very unusual.

    • Cancel
    • Vote Up +1 Vote Down
    • Cancel
  • Mabr86
    Mabr86 over 1 year ago in reply to AurelBuche

    Ok, thank you for your quick response.

    • 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