Home > Community > Forums > Custom IC SKILL > Flowchart problem

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: *

 Flowchart problem 

Last post Mon, Mar 25 2013 12:47 AM by tyanata. 2 replies.
Started by tyanata 14 Mar 2013 07:45 AM. Topic has 2 replies and 791 views
Page 1 of 1 (3 items)
Sort Posts:
  • Thu, Mar 14 2013 7:45 AM

    • tyanata
    • Top 75 Contributor
    • Joined on Sun, May 2 2010
    • Posts 83
    • Points 1,405
    Flowchart problem Reply

     Hello,

    I am trying to create procedure trigerred by starting of a simulation in ocean script with many corners using runParam() command.

    I found  way to do that with the Flowchart fucntions and it works ( I am using IC6.15 and ADE-L is opened), see the code bellow:

     

    procedure(Sim_trigger_PCT()
            let((sess_local)
                    if(asiGetCurrentSession() != nil then

                             sess_local = asiGetCurrentSession()
                            asiChangeFlowchartStep(asiGetFlowchart(sess_local)
                                    ?name 'asiNetlist
                                    ?preFunc 'CCSLoadScript_try
                            )
                    );;if
            );;let
    );;proc
     

    procedure( CCSLoadScript_try(sess)
                    printf("Test\n")
    );;proc

     

     But I want procedure CCSLoadScript_try to have more arguments, see the same code little bit modified:

     

    procedure(Sim_trigger_PCT()
            let((sess_local num_local)

                    num_local = 1
                    if(asiGetCurrentSession() != nil then

                             sess_local = asiGetCurrentSession()
                            asiChangeFlowchartStep(asiGetFlowchart(sess_local)
                                    ?name 'asiNetlist
                                    ?preFunc (CCSLoadScript_try sess_local num_local)
                            )
                    );;if
            );;let
    );;proc
     

    procedure( CCSLoadScript_try(sess num)
                    printf("Test %d\n" num)
    );;proc

     

    In that case the script is trigerred only once (there is only one text note "Test 1" in the log file), and then NO simulation has been done.

     

    Thanks in advance for the help!

    • Post Points: 20
  • Sun, Mar 24 2013 2:14 AM

    Re: Flowchart problem Reply

    The reason why you only got one "Test 1" is because it actually called your function at the time you called asiChangeFlowchartStep, not at netlisting time. It would have tried to use the return value of the function as the preFunc, which is not what you want.

    You can't just add arbitrary function signatures - the preFunc will always be called with a single argument in this case - so adding more won't help you. However, you could take advantage of SKILL++ lexical scoping - so for example, if you use the code below (put it in a file with ".ils" as the suffix) - and it will then work. The globalProc is defined within the scope containing num_local and so can access it.

    procedure(Sim_trigger_PCT()
        let((sess_local num_local)

        globalProc(CCSLoadScript_try(sess)
            printf("Test %d\n" num_local)
            ; just for fun, increment the variable
            num_local++
        )

        num_local = 1
        if(asiGetCurrentSession() != nil then
            sess_local = asiGetCurrentSession()
            asiChangeFlowchartStep(asiGetFlowchart(sess_local)
            ?name 'asiNetlist
            ?preFunc 'CCSLoadScript_try
            )
        );;if
        );;let
    );;proc
     

    Kind Regards,

    Andrew.

     

    • Post Points: 20
  • Mon, Mar 25 2013 12:47 AM

    • tyanata
    • Top 75 Contributor
    • Joined on Sun, May 2 2010
    • Posts 83
    • Points 1,405
    Re: Flowchart problem Reply

     Hello Andrew,

    Thanks for the response, from Cadence Support I received and another workaround also.

    So I will try both of them.

    • Post Points: 5
Page 1 of 1 (3 items)
Sort Posts:
Started by tyanata at 14 Mar 2013 07:45 AM. Topic has 2 replies.