• 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 Design
  3. automatically run a routine when run button is choose

Stats

  • Locked Locked
  • Replies 11
  • Subscribers 126
  • Views 17501
  • 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

automatically run a routine when run button is choose

NcfC
NcfC over 12 years ago

Hi all.

I'm using ic5141 and I would like to automatically run a routine everytime I choose to run a simulation, either by pressing Simulation->Run or by pressing the "Netlist and Run"/"Run" icons.

 I tried to follow the post on "automatically run a routine when a menu item is invoked from CIW or schematic window" - www.cadence.com/.../25992.aspx but it didn't work.

 Cold someone have any idea on how to proceed?

 Thanks in advance. 

  • Cancel
  • Andrew Beckett
    Andrew Beckett over 12 years ago

    This post might help. There are also solutions on Cadence Online Support which show how to do this. For example this.

    Regards,

    Andrew.

     

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • NcfC
    NcfC over 12 years ago

    Hi, Andrew.

    Thanks for the promptly reply.

    From what I understood of the first post, it's in the line of what I'm looking for.

    I'm trying to implement the solution #41564374 such that I don't need to input those steps every time I load a new state (thinking about it, it would be better to run the code after each state loading, instead of before each run command!!).

    I tried the script you suggested in the first post (I cannot try the ones on the Cadence Support for my account there expired) but I got an error message if I load the script from the CIW:

    *Error* eval: "undefined function - globalProc"

    I cannot the the above error if I load the code in the .cdsinit.

    This is how I wrote it:

    version 1:

    procedure( VarStopTimeSim()

    let( ( sess_local )

    globalProc( NoNumericCheck( sess )

    asiSet( sess '_byPassNumericChecks t )

    )

    if( asiGetCurrentSession() != nil then

    sess_local = asiGetCurrentSession()

    asiChangeFlowchartStep( asiGetFlowchart( sess_local ) ?name 'asiNetlist ?preFunc 'NoNumericCheck( sess_local ) 

    ) ; if

    ) ; let

    ) ; proc

    version 2:

    procedure( VarStopTimeSim()

    globalProc( NoNumericCheck()

    asiSet( asiGetCurrentSession() '_byPassNumericChecks t )

    )

    if( asiGetCurrentSession() != nil then

    asiChangeFlowchartStep( asiGetFlowchart( sess_local ) ?name 'asiNetlist ?preFunc 'NoNumericCheck )

    ) ; if

    ) ; proc

    but none of the above versions worked.

    Regards,

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 12 years ago

    So I took a quick look at Case 41564374 (it's not a solution, so that threw me, but a case you've logged with customer support), and I can see  from this that you're using IC5141, and I can see what you're trying to do. Don't try to use globalProc, because this was added to SKILL in IC615. You'd have to define it as a normal procedure (but outside the lexical scope). So just define NoNumericCheck as a normal procedure (don't put it within the other procedure) and it will (probably) work (I didn't test it).

    Actually, I'm not sure it will help you, because I think the numeric checks are done when you enter the variable on the form.

    So a far, far simpler solution would be to just do:

    tool=asiGetTool('spectre)
    asiSet(tool '_byPassNumericChecks t)

    And then you're done. No need to mess with flowchart steps - any subsequent ADE (spectre) session will inherit this.

    Regards,

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 12 years ago

    I've just realised that this is using asiSet, which is a private function - and also _byPassNumericChecks is a private flag. Really it would have been best to continue this discussion via customer support rather than in a public forum - you were informed in the Case that this was private.

    Anyway, for anyone else reading this, there's no need to do this in IC61 since that allows you to put VAR("stoptime") in the stop time field of a transient analysis (or in pretty much any other  field that only supports numbers). The functions used above are private and may change at any time and break any code you write which is dependent upon them, so caveat emptor.

    Regards,

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • NcfC
    NcfC over 12 years ago
    Thanks, Andrew. Right now I'm using the steps you mentioned. I was looking if there was a way to automatically run those steps when you load a new ADE session, instead of input them every new session. Regards,
    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 12 years ago

    If you use the asiGetTool() approach I showed, you can do this completely up front (e.g. in the .cdsinit) - no need to do it when you load a new ADE session. If you use the asiSet() passing it the result of asiGetCurrentSession(), then you have to do it each and every time an ADE session is launched.

    So simply put the code I gave in your .cdsinit and you're done.

    Regards,

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • NcfC
    NcfC over 12 years ago

    hi, Andrew. Thanks very much for the reply.

     I just tried the code but it didn't recognized the stop time variable:

     *Error* Incorrect analysis specification:

     Transient - "Stop Time": String does not represent a numeric value

     Regards,

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 12 years ago

    Did you do it before you opened any ADE window? It will not affect existing ADE windows.

    I tried it, and it worked fine.

    Also, after opening the ADE window, if you do:

      asiGet(asiGetCurrentSession() '_byPassNumericChecks)

    what does it return?

    And what does:

      asiGet(asiGetTool('spectre) '_byPassNumericChecks)

    Regards,

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • NcfC
    NcfC over 12 years ago

    Andrew,

    I first added it in the .cdsinit, as you suggested. It didn't work.

     If I do

     asiGet(asiGetCurrentSession() '_byPassNumericChecks)

    before I open an ADE window, I get

     *Error* asiGet: no applicable method for the class - list

    If I do it after I open an ADE window and run a simulation, I get

     *Error* Incorrect analysis specification:

     Transient - "Stop Time": String does not represent a numeric value

    If I do

     asiGet(asiGetTool('spectre) '_byPassNumericChecks)

    before  I open an ADE window, I get

     nil

    and the get the same error message when I run a simulation as before

    If I do

    asiSet(asiGetCurrentSession() '_byPassNumericChecks t)

    after I load a state in ADE, I can run a simulation without problems (until I choose another design; then I have to input the line above again after loading the state for the new design).

     Regards. 

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 12 years ago

     asiGet(asiGetCurrentSession() '_byPassNumericChecks)

    will only work if you have an ADE session option (I asked you to do it with an ADE window open - possibly you did but the ADE window wasn't the current window.

    Anyway, the

      asiGet(asiGetTool('spectre) '_byPassNumericChecks)

    result you show suggests that your .cdsinit didn't get loaded, or you didn't have:

      asiSet(asiGetTool('spectre) '_byPassNumericChecks t)

    in your .cdsinit. I'd put some print statements around it to see if it got loaded.

     

    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