Home > Community > Forums > Custom IC SKILL > How to check if CDF-update is necessary?

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

 How to check if CDF-update is necessary? 

Last post Tue, Jul 23 2013 5:39 AM by skillprogramme. 6 replies.
Started by skillprogramme 15 Jul 2013 03:48 AM. Topic has 6 replies and 801 views
Page 1 of 1 (7 items)
Sort Posts:
  • Mon, Jul 15 2013 3:48 AM

    How to check if CDF-update is necessary? Reply

    Hi!

    I have been using the scripts provided in the solution linked below for updating CDF parameters in cells and libraries with great success. However, I am often interested in checking if a cell does require a CDF update before actually performing the update, since the update requires "append" mode and is rather time consuming (especially when running on a large library). Is there any good way to utilize this script/other functionality to check if an instance in a cell requires a CDF-update without doing the actual update? It can be quite dangerous to run the script on a whole library with edit and not knowing which parameters that changed in the end. 

    My hack-around for this has so far been to dump all CDF parameters to a log file, run the script, dump the parameters again and do some parsing and comparison of these logs. I would however prefer something simpler.

    Best regards,

    Max 

     

    Related solution:

    http://support.cadence.com/wps/myportal/cos/COSHome/viewsolution/!ut/p/c5/dY1bDoIwFAXX4gruLUotn9gIQg1EIAr8kKrgC9rGt6xeXIBzPicnAyUMU_J5Osj7SSvZQg4lrYjlcyIm6MQ8YhgwGolkPccB2PwetMI_uAgFlNOftyzC0PG9bIYBF0HIpmMLBYW10tduKGWQ46RKz2jCLB2_Prt-STS7idREZFULL25UG5YX-9HYbV10Jtma5K2lfzxKP3wUNN7Llt-4G9tN7-AIooXuajAX1XvMHX0B7QyI-A!!/dl3/d3/L2dBISEvZ0FBIS9nQSEh/ 

    • Post Points: 20
  • Wed, Jul 17 2013 3:04 AM

    Re: How to check if CDF-update is necessary? Reply

    Hi Max,

    There's nothing that really does this. Potentially you could use the functions in the code to run the callbacks on the "effective lookalike" CDF and then compare the results before applying them. In other words, you'd do something like:

    cdf=cdfGetInstCDF(instId)
    effCDF=CCScreateEffectiveCDFLookalike(cdf t)
    CCSinvokeObjCdfCallbacks(effCDF) ; add other args as needed

    then you can loop over the parameters of both the cdf and effCDF and see if there were any differences - this way it doesn't really apply any changes - just calls the callback in memory only. This approach will only work if you can get away with using this effective lookalike CDF; if you have CDF callbacks that do strict type checking on their arguments, it won't work.

    Note the above is not from testing anything - it's from a quick look at the code (which was written by me, so I think it will work). I have used a similar trick in the past when building hierarchical pcells, where I needed to call the CDF callbacks within a pcell. For speed I wanted to call all the callbacks up front, and then apply all the derived parameters to the pcell instance, to avoid it re-evaluating the pcell for each combination that was found as it iterates through all the parameters.

    Regards,

    Andrew.

     

    • Post Points: 20
  • Fri, Jul 19 2013 4:15 AM

    Re: How to check if CDF-update is necessary? Reply

    This looks very promising, thanks a lot Andrew!

    I compared the values of the parameters in cdf and effCDF and got many mismatches. I took a look inside CCScreateEffectiveCDFLookalike, and when setting the parameters, I see that they're set to their default value instead of their original value. This is done with:

      ; reset the value to defValue for safety
    (putpropq newParam (getq newParam defValue) value)

    This explains the mismatches I got, since the parameters in cdf and effCDF had different values. As far as I can see, commenting out that line provides the functionality I want. However, why is the parameters set to their default values for safety? 

    Regards,

    Max 

     

    • Post Points: 20
  • Fri, Jul 19 2013 4:37 AM

    Re: How to check if CDF-update is necessary? Reply

    Hi Max,

    The reason was that in the application that I added this for (creating an instance inside a hierarchical pcell, where I needed to call the callbacks), it was a fresh instance and so everything should have been at the default - and I was passing the cell CDF into the CCScreateEffectiveCDFLookalike function. Occasionally if called at the wrong time, the effective Cell CDF can end up with non-default parameters in (I forget the scenarios) and so I wanted to make sure it was reset. I then took the effective lookalike CDF that I was creating, and set the parameters I wanted to set for the child instance, and then called the callbacks on it.

    If you're passing in the instance CDF, then you don't really want to reset everything. So maybe adding another argument to the function to not reset would make sense (or just comment out the code).

    I'll add that to my list of things to do - to update the solution to the latest version, and to add this parameter.

    Regards,

    Andrew.

    • Post Points: 20
  • Fri, Jul 19 2013 4:50 AM

    Re: How to check if CDF-update is necessary? Reply

    Hi Andrew, 

    I agree that an extra optional parameter is the best solution. I'll add it to the my version here for now. Could you also bump this thread when you update the online solution?

    I have done some more testing now and your suggestion seems to do everything I want. Thanks a lot!

    Regards, 

    Max

    • Post Points: 20
  • Fri, Jul 19 2013 10:47 AM

    Re: How to check if CDF-update is necessary? Reply

     Max,

    I've updated solution 11018344 to the latest version (it was almost the latest version - I just added this modification).

    Regards,

    Andrew.

     

    • Post Points: 20
  • Tue, Jul 23 2013 5:39 AM

    Re: How to check if CDF-update is necessary? Reply

    Thanks Andrew, this is doing exactly what I want to do!

    Regards, 

    Max 

    • Post Points: 5
Page 1 of 1 (7 items)
Sort Posts:
Started by skillprogramme at 15 Jul 2013 03:48 AM. Topic has 6 replies.