Can sombody tell me how to call a pcell?
Vignesh T K
Well, you don't "call" a pcell as such, but you create an instance of it. Typically this is done with either dbCreateParamInst() or dbCreateParamInstByMasterName().
In reply to Andrew Beckett:
This i have used to place an instance in the layout.
cv = dbOpenCellViewByType(libname cellname "schematic" "" "a")dfs=dbOpenCellViewByType("analogLib" "cap" "symbol""schematicSymbol" "r")inst=dbCreateParamInst(cv dfs nil (0:2) "R0" 1).
Can you plz. tel me how can i change the properties(legth, width, M-factor) of the instance.
In reply to Vignesh054:
The dbCreateParamInst() function provides syntax for supplying parameters, it is an optional argument ( l_params in the documentation):
[ b_physOnly ] ] ]
=> d_inst | nil
[ b_physOnly ] ] ]
=> d_inst | nil
l_params List of l_param, where l_param is list(t_propName t_propType g_value).
Supply the parameters that you wish for the device at the time of instantiation.
I hope that this answers your question.
In reply to skillUser:
This may be a basic question, sorry fot that.
What all parameters can be given in l_params?
I searched in sourcelink, and i couldn't get any document related to dbCreateParamInst().
Can you please give me a link reference?
Vignesh T k
The list of parameters depends on the parameters available on the pcell you are placing. If it is your own pcell, then you should know what these parameters are. If you want to know what parameters are available on a pcell, do the following:
1. Place an instance of a pcell in Virtuoso2. Select that one instance. In your CIW, css() will give you the "car of the selected set" which is essentially the database object of what you just selected.3. From this database ID, you can find all of the parameters:To get all the attributes and values of each parameter for the master of this instance:css()~>master~>parameters~>value~>??To just see the parameter names:css()~>master~>parameters~>value~>nameTo just see the current values:css()~>master~>parameters~>value~>valueTo just see the valueTypes:css()~>master~>parameters~>value~>valueType
Now, you can construct your l_params (list of parameters) for dbCreatParamInst using any of the parameters found in the previous step. You'll need to know the name, valueType and value you wish to set. You only need to include parameters whose default you wish to change.
Example: master=dbOpenCellViewByType("myLib" "myPcell" "layout") paramList = list( list("w" "float" 10.0) list("h" "float" 5.0) ) dbCreateParamInst(geGetEditCellView master nil 0:0 "R0" 1 paramList)
In reply to dmay:
Thank you so much.. It is working. But i have some problems
1. I gave list("hspiceModel" "string" "nhv"). But still it is placing nshort as default, Even after changing the nhv to nlowvt or anything the answer is the same. When select the placed tran and check the value of hspiceModel using "css()~>master~>parameters~>value~>value" it is giving "nhv" or the other changed value.
2 . I gave w=2 and l=3, and it is placing the same in the layout, But when i check the properties using GUI it is showing some default value. But when i check through CIW it is giving correct value.
Can you help on this?
Thanks and regards,
I suspect there may be some other parameters that may need adjusting. There is probably a CDF associated with this pcell and some of the parameters may have some callbacks that could be setting other parameters as well. You should take a look at the CDF like this:
From the CIW Tools menu, select CDF, then Edit. Enter the library name and cell name of the pcell. It may be easiest to then save this to a file and search for the "hspiceModel" parameter. Look for "callback" entries and examine the code associated with the different parameters.
I did the same and it is showing somthing like this,
(nil name "hspiceModel" paramType "string" defValue "nshort" prompt
"hspiceModel Name" choices nil parseAsNumber nil units nil use nil
display "nil" editable nil dontSave nil callback nil storeDefault t
(nil name "hspiceModelMenu" paramType "cyclic" defValue "nshort" prompt
"Model Name" choices ("nhv" "nhvesd" "nhvnative" "nhvnativeesd"
"nlowvt" "nshort" "ntvnative")parseAsNumber nil units nil use nil
display nil editable nil dontSave nil callback "(CDFmodelFetCallback t
\"nfet\")" storeDefault t parseAsCEL nil))
Still i couldn't solve the problem. can you help me to get rid of this propblem?
Looking back at the history of this email it doesn't look like you have spent much time in the documentation. Please take a look at Cadence's documentation, it is very good and there is some very helpful information about creating and placing pcells.
It looks like when you place a pcell, the CDF (this is what controls what appears on the Create Instance form) is only displaying the hspiceModelMenu parameter, but it is not displaying the hspiceModel parameter. From what you sent, you can see this. For the hspiceModel parameter, the display is set to nil and the editable is set to nil. Your form apparently prompts you with Model Name and a cyclic field. The default value for the cyclic field is nshort. When you change this, there is a callback associated with it. The callback is a Skill procedure that will run when this parameter is changed. In your case, the Skill procedure is called CDFmodelFetCallback and it is receiving the arguments of t and "nfet".
You should find where this procedure is defined and take a look at what it does. If you don't know where this procedure is defined, use the following command to show the procedure in your CIW: pp(CDFmodelFetCallback)
One way to figure out what parameters need to be set on your instance using skill code is to see what parameters are set when placing the pcell interactively.
1. Use the Create Instance form to place one of these pcells.2. Click the Defaults button at the top of the form and place one instance3. Select that instance in the window and in your CIW, run the following command:css()~>prop~>??This should show you all parameters that were physically set on that instance. Note the name, type and value. Most likely, a default instance will not have any properties.4. Place another instance, this time change the Model Name parameter to "nhv".5. Repeat step 3 and this time you should see that hspiceModel is likely set, as well as hspiceModelMenu and possibly some other values. Whatever you see set at this time, is what you should include in your parameter list when using dbCreateParamInst.