Until recently I had always used pcDefinePCell in a way that let Cadence guess the type or arguments I was passing to it, for example, as taken from the pcell reference manual:
( list (ddGetObj "libName") "cellName" "viewName" "viewType" )( ( param1 "defaultValue") ( param2 10) ( paramN 1))
Cadence could guess the type of param1, param2 and paramN and everything went fine. However the manual explicitly says that in the case of a boolean value, one should specify the dataType as in ( param2 dataType nil ), but doesn't provide a list of the dataTypes, at least not where I looked:
Virtuoso Parameterized Cell Reference p195Custom Layout SKILL Functions Reference p332SKILL Language User Guide p25
Please note that I don't only need the dataType format for booleans, but also for all other types. The reason for this is I'm writing a macro to replace all occurances of pcDefinePCell with myDefinePCell in my code. The later would then call pcDefinePCell and also define a new function that wraps code for (dbCreateParamInstByMasterName ...) with the proper parameter list belonging to this particular pcell.
There are many datatypes that can be used for PCell parameters, however I am not sure what the exact list is (so far, I too could not find a definitive list in the documentation yet).
While not exactly the answer you are looking for, there is a reduced list of parameter dataTypes that can be used if the parameter will also have CDF for it, see the following SourceLink Solution:
SourceLink Solution 11130422
I hope that this helps! In the meantime I will keep looking and post any results thatI find.
In reply to skillUser:
Thank you Lawrence !
I will look at this link as soon as I can manage to create a SourceLink account.. it seems to require that I ask my administrator our Cadence Host ID.
Meanwhile I found a solution to my problem by looking, as you hinted, to the CDF parameters. When you create a CDF parameter you are given a list of choices: string, int, float, radio, cyclic, button and netSet. You can use any of them like this: (param1 int 3), use them as a symbol, no quote needed. I suppose this is what I could have found by following your link.
In reply to gsimard:
I'm sorry, I did not realise that you only needed to know the format/syntax of (parameterName dataType defaultValue)
I am including below a section from the solution, specifically what you would need to put for the "dataType" argument in the l_formalArgs argument to the pcDefinePCell function:
CDF paramType PCell parameter type---------------+--------------------string | stringcyclic | stringradio | stringfloat | floatint | intboolean | boolean
I hope it helps.
If you are using CDF's, be aware that the Booleans return "TRUE" or "FALSE" as the pcell parameter value. Where ever I have a user entered parameter value, I usually make it a string in both the CDF and the pcell declaration. That way I always know what is coming in and how to translate it into usable values.
We are having a problem with some initial conversions using cdb2oa. We have some pcell symbols that have cdfs with properties that are netSet property types. However, we cannot compile our pcell symbols with this same property type (netSet is not a valid pcell parameter). The cdb2oa documentation states the following:
For all good CDF data, cdb2oa will be able to take CDF into account while instance creation. However, for bad CDF data (pcell superMaster parameter and CDF parameter with same name and incompatible valueTypes), cdb2oa will drop the override with approptiate warnings.
What is the recommended way to handle this? Will these pcells work ok in OA if the property types are different? Is this only a conversion issue when the default value is used?