• 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. Using Callbacks

Stats

  • Locked Locked
  • Replies 1
  • Subscribers 143
  • Views 17201
  • 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

Using Callbacks

KGh94
KGh94 over 7 years ago

Hello,

I have seen callbacks in action in some scripts but never grasped the concept of how callbacks really work.

An example is given:

;; Post-simulation callback. Called after each run.

define( RunFinishedCallback(session runID)

    printf("Run ID %L has finished" runID)
)

; Run simulations
history1 = maeRunSimulation(?session session1 ?callback "RunFinishedCallback")

How are session and runID passed to the RunFinishedCallback function? and what passes them?

Best regards,
Karam

  • Cancel
  • Andrew Beckett
    Andrew Beckett over 7 years ago

    Hi Karam,

    The term "callback" is used for a number of different situations, but in general it's a means of having a function that gets called when some kind of event occurs. In this case it's called when the simulation finishes. In some cases the callback is a complete SKILL expression which is just evaluated using evalstring, but in others you provide the name of the function to call (or in an increasing number of cases, you can also provide the function object which is beneficial when using SKILL++). In this case you're doing just that - providing the name of the function to call.

    The documentation for the function which triggers the callback should explain how the callback should be written. It does in this case too (via the examples), although it doesn't do a great job of explaining what the arguments mean. What happens in the case when you supply just a function name is that it automatically calls that function with some arguments to supply information about the context under which the callback was triggered - in this case the maestro session ID and also the run ID (to indicate which run completed). It's the maeRunSimulation function (or rather the event at the end of the simulation) which will call the callback and supply the arguments.

    Hope that helps,

    Regards,

    Andrew.

    • Cancel
    • Vote Up +1 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