Home > Community > Forums > Custom IC SKILL > Editing VerilogA parameters using SKILL script

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

 Editing VerilogA parameters using SKILL script 

Last post Wed, Nov 26 2008 2:16 AM by Shamnur. 2 replies.
Started by Shamnur 24 Nov 2008 07:44 PM. Topic has 2 replies and 2967 views
Page 1 of 1 (3 items)
Sort Posts:
  • Mon, Nov 24 2008 7:44 PM

    • Shamnur
    • Not Ranked
    • Joined on Tue, Oct 7 2008
    • Posts 2
    • Points 25
    Editing VerilogA parameters using SKILL script Reply

    Hi All,

    I am working on script to modify the CDF parameter( the VerilogA design parameters) of a cell.

    E.g: A veriloga parameter (say "length" in "myCell") need to be modified using SKILL routine.
    -------------------------------------------------------------------------------
    cellObj = ddGetObj( "myLib" "myCell" nil nil nil "a")
    bcCdf = cdfGetBaseCellCDF( cellObj)
    ....
    if( bcCdf->parameters->name == "length")
    then
        lengthParam  = nth( i bcCdf->paramters)
        lengthParam->defValue = 44
    );if
    .....
     >>>> *WARNING* Can't modify attributes of effective CDF parameters.
    -------------------------------------------------------------------------------

    However, this warning inhibits me to modify any parameters similarly.

    Is there a way, I can bypass this and edit the parameters ?

    Please let me know if the community has a solution for this.

    Thanks,
    Shamnur

     

     

     

     

    • Post Points: 20
  • Tue, Nov 25 2008 8:35 AM

    • skillUser
    • Top 10 Contributor
    • Joined on Fri, Sep 19 2008
    • Austin, TX
    • Posts 2,581
    • Points 15,825
    Re: Editing VerilogA parameters using SKILL script Reply

     HI Shamnur,

    If this code above is your actual code that has been copied and pasted here, then there is a typo that may be causing problems:

    lengthParam  = nth( i bcCdf->paramters)

    perhaps this should be:
    lengthParam  = nth( i bcCdf~>parameters) 

    I'm sure that there is a cleaner way than using "nth" but I can't see the surrounding context, so I don't know exactly what the rest of your code looks like. You might consider the cdfFindParamByName() SKILL function:

    cdfFindParamByName( g_cdfDataId t_name )
         => g_paramId / nil

    Use the "squiggly arrow" (tilde followed by greater-than) when working with cdf or db objects.

    Regards,

    Lawrence

    • Post Points: 20
  • Wed, Nov 26 2008 2:16 AM

    • Shamnur
    • Not Ranked
    • Joined on Tue, Oct 7 2008
    • Posts 2
    • Points 25
    Re: Editing VerilogA parameters using SKILL script Reply

    Hi Lawrence,

    Thanks for the close observation. The typo is only in composing this post however it isn't there in my actual code.

    Well, I realized a solution for my problem which I would like to share. However this has pushed me into another problem which happens to be the continued discussion.

    Solution:

    We can edit the parameter(say lengthParam) values in two ways.

    1) cdfgData->lengthParam->defvalue =33

    2) cellObj = ddGetObj( "myLib" "myCell" nil nil nil "a")
        bcCdf = cdfGetBaseCellCDF( cellObj)

        lengthParam  = nth( i bcCdf->parameters) ; Assuming ith value is lengthParam

       lengthParam->defValue = 33

    The first one would issue the mentioned Warning message which I had interpreted wrongly before and the second one wouldn't issue the warning message. So, going by (2) method solved my problem.

    New Problem:
    a) When I attach a callback message to the same parameter which happens to be a dialogBox to lengthParam->callback, it fails !!

    e.g: lengthParam->callback = "hiDisplayAppDBox(?name 'f ?dboxBanner \"Warning\" ?dboxText \"The defValue is being assigned back\" ?dialogType hicWarningDialog ?dialogStyle 'modal ?buttonLayout 'OKCancel ) "

    It is leading to segmentation faults !! 

    b) If I were to attach a  callback which is a simple print statement etc, the results are fine.

    e.g: lengthParam->callback = "printf(\" I am assigning the value back to default\")"

     

    Thanks,
    Ganesh

     

     

     

    • Post Points: 5
Page 1 of 1 (3 items)
Sort Posts:
Started by Shamnur at 24 Nov 2008 07:44 PM. Topic has 2 replies.