• 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. Running skill function before simulation to prevent its...

Stats

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

Running skill function before simulation to prevent its start

aakhavan
aakhavan over 8 years ago

I'd like to set up my environment to run a skill function just before a simulation starts to check system load. If the load is too high, it will display a message and prevent the simulation from running. I need to support both ADE-L and ADE-XL. What's the best way to do this?

From what I've found in the documentation, I can add a pre-simulation callback in ADE-XL using the axl* functions and signals/triggers. However, it does not appear that the callback can prevent the simulation from running.

For ADE-L, I've not been able to find a similar pre-sim callback. I could either overwrite all of the toolbar buttons and menu items, or overwrite the run functions. It seems that the UI elements are all re-generated and the callbacks for them changed every time the simulator changes, which poses a problem.

I can overwrite all of the run simulation functions, but I'd have to do so for every simulator (assuming they don't get re-defined on simulator changes).

  • Cancel
Parents
  • Andrew Beckett
    Andrew Beckett over 8 years ago

    For ADE XL (and Explorer and Assembler) you'd use a preRun trigger (specified with axlSessionConnect). In the preRun trigger, you need to set this env var - it's not based on the return value of the preRun trigger (unfortunately) - so you need to use this as a semaphore to indicate that you want to halt the run:

    ;----------------------------------------------------------------
    ; This is a semaphore to indicate that the simulation should not
    ; proceed
    ;----------------------------------------------------------------
    envSetVal("adexl.simulation" "haltCurrentRunAfterPreRunTrigger" 'boolean t)

    For ADE L, you'd change the flowchart step for (say) asiStartSimulator:

    procedure(CCFstartSimPreFunc(session)
      let(((status t))
        when(getd('CCFexistingSpectrePreFunc)
          status=CCFexistingSpectrePreFunc(session)
        )
        when(status
          ; do your determination on whether to proceed here and return t (to start) or nil (to not start)
          ; the line below is just to allow me to experiment with setting CCFRETURNVALUE globally to t or nil to 
          ; control whether sim starts or not
          if(boundp('CCFRETURNVALUE) then CCFRETURNVALUE else t)
        )
      )
    )

    tool=asiGetTool('spectre)
    flow=asiGetFlowchart(tool)
    step=asiGetFlowchartStep(flow 'asiStartSimulator)
    unless(step->preFunc=='CCFstartSimPreFunc
      putd('CCFexistingSpectrePreFunc step->preFunc)
    )
    asiChangeFlowchartStep(flow ?name 'asiStartSimulator ?preFunc 'CCFstartSimPreFunc)

    Hope that helps!

    Regards,

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Reply
  • Andrew Beckett
    Andrew Beckett over 8 years ago

    For ADE XL (and Explorer and Assembler) you'd use a preRun trigger (specified with axlSessionConnect). In the preRun trigger, you need to set this env var - it's not based on the return value of the preRun trigger (unfortunately) - so you need to use this as a semaphore to indicate that you want to halt the run:

    ;----------------------------------------------------------------
    ; This is a semaphore to indicate that the simulation should not
    ; proceed
    ;----------------------------------------------------------------
    envSetVal("adexl.simulation" "haltCurrentRunAfterPreRunTrigger" 'boolean t)

    For ADE L, you'd change the flowchart step for (say) asiStartSimulator:

    procedure(CCFstartSimPreFunc(session)
      let(((status t))
        when(getd('CCFexistingSpectrePreFunc)
          status=CCFexistingSpectrePreFunc(session)
        )
        when(status
          ; do your determination on whether to proceed here and return t (to start) or nil (to not start)
          ; the line below is just to allow me to experiment with setting CCFRETURNVALUE globally to t or nil to 
          ; control whether sim starts or not
          if(boundp('CCFRETURNVALUE) then CCFRETURNVALUE else t)
        )
      )
    )

    tool=asiGetTool('spectre)
    flow=asiGetFlowchart(tool)
    step=asiGetFlowchartStep(flow 'asiStartSimulator)
    unless(step->preFunc=='CCFstartSimPreFunc
      putd('CCFexistingSpectrePreFunc step->preFunc)
    )
    asiChangeFlowchartStep(flow ?name 'asiStartSimulator ?preFunc 'CCFstartSimPreFunc)

    Hope that helps!

    Regards,

    Andrew.

    • 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