Home > Community > Forums > Custom IC Design > automatically run a routine when run button is choose

Email

* Required Fields

Recipients email * (separate multiple addresses with commas)

Your name *

Your email *

Message *

Contact Us

* Required Fields
First Name *

Last Name *

Email *

Company / Institution *

Comments: *

 automatically run a routine when run button is choose 

Last post Wed, May 1 2013 4:30 PM by NcfC. 11 replies.
Started by NcfC 29 Apr 2013 03:30 PM. Topic has 11 replies and 1462 views
Page 1 of 1 (12 items)
Sort Posts:
  • Mon, Apr 29 2013 3:30 PM

    • NcfC
    • Top 500 Contributor
    • Joined on Mon, Feb 27 2012
    • Chandler, AZ
    • Posts 28
    • Points 440
    automatically run a routine when run button is choose Reply

    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" - http://www.cadence.com/community/forums/T/25992.aspx but it didn't work.

     Cold someone have any idea on how to proceed?

     Thanks in advance. 

    • Post Points: 20
  • Tue, Apr 30 2013 4:41 AM

    Re: automatically run a routine when run button is choose Reply

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

    Regards,

    Andrew.

     

    • Post Points: 20
  • Tue, Apr 30 2013 3:19 PM

    • NcfC
    • Top 500 Contributor
    • Joined on Mon, Feb 27 2012
    • Chandler, AZ
    • Posts 28
    • Points 440
    Re: automatically run a routine when run button is choose Reply

    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,

    • Post Points: 20
  • Wed, May 1 2013 7:19 AM

    Re: automatically run a routine when run button is choose Reply

    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.

    • Post Points: 20
  • Wed, May 1 2013 7:23 AM

    Re: automatically run a routine when run button is choose Reply

    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.

    • Post Points: 5
  • Wed, May 1 2013 11:06 AM

    • NcfC
    • Top 500 Contributor
    • Joined on Mon, Feb 27 2012
    • Chandler, AZ
    • Posts 28
    • Points 440
    Re: automatically run a routine when run button is choose Reply
    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,
    • Post Points: 20
  • Wed, May 1 2013 2:35 PM

    Re: automatically run a routine when run button is choose Reply

    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.

    • Post Points: 20
  • Wed, May 1 2013 3:15 PM

    • NcfC
    • Top 500 Contributor
    • Joined on Mon, Feb 27 2012
    • Chandler, AZ
    • Posts 28
    • Points 440
    Re: automatically run a routine when run button is choose Reply

    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,

    • Post Points: 20
  • Wed, May 1 2013 3:44 PM

    Re: automatically run a routine when run button is choose Reply

    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.

    • Post Points: 20
  • Wed, May 1 2013 4:09 PM

    • NcfC
    • Top 500 Contributor
    • Joined on Mon, Feb 27 2012
    • Chandler, AZ
    • Posts 28
    • Points 440
    Re: automatically run a routine when run button is choose Reply

    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. 

    • Post Points: 20
  • Wed, May 1 2013 4:25 PM

    Re: automatically run a routine when run button is choose Reply

     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.

    • Post Points: 20
  • Wed, May 1 2013 4:30 PM

    • NcfC
    • Top 500 Contributor
    • Joined on Mon, Feb 27 2012
    • Chandler, AZ
    • Posts 28
    • Points 440
    Re: automatically run a routine when run button is choose Reply

    Andrew,

     you were right. There was an error message in the CIW about some other customization and the .cdsinit did not get loaded. But I didn't see it.

    After removing the error and .cdsinit correctly loaded, everything ran smoothly, as you predicted. Thanks very much.

    Regards

     

    • Post Points: 5
Page 1 of 1 (12 items)
Sort Posts:
Started by NcfC at 29 Apr 2013 03:30 PM. Topic has 11 replies.