Home > Community > Forums > Custom IC SKILL > SKILL Variable

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

 SKILL Variable 

Last post Mon, Jan 21 2013 11:35 PM by Andrew Beckett. 8 replies.
Started by hrishikesh 28 Dec 2012 02:04 AM. Topic has 8 replies and 1517 views
Page 1 of 1 (9 items)
Sort Posts:
  • Fri, Dec 28 2012 2:04 AM

    • hrishikesh
    • Not Ranked
    • Joined on Fri, Dec 28 2012
    • Posts 5
    • Points 85
    SKILL Variable Reply

    I am new to Cadence SKILL. I am trying to understand a SKILL script file containing many procedures. Many of these procedures use a variable which holds a constant list. But it doesn't seem to be assigned anywhere in the script file. Can you suggest any possible place from where it could be assigned? Is there any way in SKILL to import variables from another file?

    • Post Points: 20
  • Fri, Dec 28 2012 3:58 AM

    • marcelpreda
    • Top 200 Contributor
    • Joined on Tue, Jan 19 2010
    • Bucharest, Romania
    • Posts 44
    • Points 715
    Re: SKILL Variable Reply

     Hi there,

     By default all the SKILL vars are global.

    To identify where there were defined, may not be an easy task:

    You have to look for calls like load(...) and/or loadi(...) in your code , or in CDS.log file.

    Vars can  also be defined in context ("compiled") files, using loagContext() functions - here it is even more dificult to track.

    After identifimg all those files use "grep"  command  to find the lines where the var was defined.

     

    BR,

    Marcel

    • Post Points: 20
  • Wed, Jan 2 2013 2:20 AM

    • hrishikesh
    • Not Ranked
    • Joined on Fri, Dec 28 2012
    • Posts 5
    • Points 85
    Re: SKILL Variable Reply

     Hi Marcel,

    Thanks for your reply. I checked the log file. It says loading many .il and .cxt files. But some of the files only have their names specified, not the complete path. Any info to locate them would be very helpful.

     BR,

    Hrishikesh

    • Post Points: 20
  • Wed, Jan 2 2013 3:44 AM

    Re: SKILL Variable Reply

    Hrishikesh

    If you use this code:

     procedure(CCFwhereVarSet(varName newValue)
        printf("Variable %s set to %L in %L\n" varName newValue get_filename(piport))
        ; stacktrace()
        newValue
    )

    and then do:

    setguard('theVarYouWantToCheck 'CCFwhereVarSet)

    (replace 'theVarYouWantTo Check with whatever name you're looking for), it will tell you the file where it is set (if a SKILL file; not if set in a context file unfortunately). You could also uncomment the stacktrace() to tell you which function it was in when the variable was set.

    Might help...

    Andrew.

    • Post Points: 20
  • Wed, Jan 2 2013 7:59 AM

    • hrishikesh
    • Not Ranked
    • Joined on Fri, Dec 28 2012
    • Posts 5
    • Points 85
    Re: SKILL Variable Reply

     Thanks, Andrew. I figured out that the variable is loaded through a load() function in one of the procedures. Should your method still work?

    • Post Points: 20
  • Wed, Jan 2 2013 8:03 AM

    Re: SKILL Variable Reply

    Yes. The setguard sets a "guard" function which gets called whenever the named variable is set, and that guard function uses get_filename(piport) to see what file is being read at the time the variable is set. So if it is set within a file that is being loaded, it should tell you. If the global variable was instead directly set inside the procedure, it wouldn't tell you - but the stacktrace() would hopefully reveal which function is was being set in.

    Regards,

    Andrew.

    • Post Points: 20
  • Mon, Jan 7 2013 2:57 PM

    • marcelpreda
    • Top 200 Contributor
    • Joined on Tue, Jan 19 2010
    • Bucharest, Romania
    • Posts 44
    • Points 715
    Re: SKILL Variable Reply

    Hi Andrew,

    Just testing setguard() procedure; it is really helpfull.

    I had no idea that we have such an usefull "tool".

     

    BR,

    Marcel

    • Post Points: 20
  • Mon, Jan 21 2013 5:57 PM

    • mtwadeCU
    • Not Ranked
    • Joined on Tue, Jan 22 2013
    • Posts 6
    • Points 105
    Re: SKILL Variable Reply

    I'm having a similar problem, so I thought I'd add on to this thread. I have an existing library that I wanted to copy to a new library and change the reference libraries to the new library. I did this using the "copy wizard," and it seemed to work for the most part. However, I have SKILL scripts where I'm trying to create PCELLs in this new library, and I'm running into problems. 

     I am using an optional input parameter for my script called "dbDelta" which is set at the top of the script (before the "let" statement) using the following syntax: (dbDelta list(1.0 1.0))

     It was causing errors that it's never caused before, so I used the setguard() function mentioned above to see where this variable was being changed. The setguard() function told me:

    Variable dbDelta set to '('('('('((1.0 1.0)))))) in "(path of script I'm working with)" 

    It seems that the error is a result of copying the old library to a new library and using the "update instances" option in the "copy wizard". Nowhere in my script am I setting the value of dbDelta other than the top, and if I change the name of dbDelta to anything else, the problem goes away. Thoughts? 

    • Post Points: 20
  • Mon, Jan 21 2013 11:35 PM

    Re: SKILL Variable Reply
    It's virtually impossible to know without seeing your code. Can you post it?
    • Post Points: 5
Page 1 of 1 (9 items)
Sort Posts:
Started by hrishikesh at 28 Dec 2012 02:04 AM. Topic has 8 replies.