Hi,While trying to create a general procedure to modify the various parameters (e.g., w and numfinger) of a FET in schematic view, I encountered a problem that puzzle me. w and numfingers are the string listed under the Name column of Edit CDF. After opening the schematic view, I use the dBFindAnyInstByName to find the instance (N0) that I want to modify and executed the following code: dutInst=dbFindAnyInstByName(CV "N0") dutInst~>w="2.4u"and this piece of code seems to work when I execute the following code: cdfFindParamByName(cdfGetInstCDF(dutInst) "w" )~>valueHowever, the value for Width did not get updated if I try to execute the following code: FETParam="w" dutInst~>FETParam="2.4u"Did I do something incorrect or the access operator was written such that I must explicit use the name and not a variable?Regards,
The access operator (~>) treats the right-hand side as a literal and does not evaluate. This operator maps to the function getq which implicitly quotes the second argument, so your code currently translates to getq(dutInst FETParam). You need the get operator which evaluates both of its arguments; so now write your code as get(dutInst FETParam) and it should work as expected. Don't forget that changing CDF parameters through SKILL does not cause any related callbacks to be invoked - if this is necessary (most likely it will be), then you should take a look at Solution Article 11018344.
Hopefully this will help you.
In reply to skillUser:
Thank you for the suggestion on using get and figure that I could use the putprop function to update the values for the properties of a symbol. While speaking to another coworker, he suggested that I could also use dbReplaceProp. Which of these two commands is the prefer method with respect to being more efficient?
putprop(dutInst ParamValue FETParam) or dbReplaceProp(dutInst ParamName 'string ParamValue)
With respect to the related callbacks, I had looked at that solution you mentioned and implemented it in my code.
In reply to slim5:
Hi Su Lim,
the dbReplaceProp() function is probably the best choice, but if the other methods (get/set or putprop) work they are reasonable choices (i.e. they are not "wrong"). I doubt you would be able to measure any differences in efficiency in this case; though generally speaking it is best to use the built-in specific API over another method (for example, dbFindNetByName() is probably more efficient than car(setof(obj cv~>nets obj~>name=="searched_for_net")) ). In this case, using dbReplaceProp indicates to anyone reading the code that you are replacing a property in the database - the function name actually helps clarify what the intention is.
It sounds like you have this working now, good work!