Home > Community > Forums > Custom IC SKILL > How to call a Pcell?

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 call a Pcell? 

Last post Fri, Aug 14 2009 5:48 AM by dmay. 9 replies.
Started by Vignesh054 14 Jul 2009 09:35 PM. Topic has 9 replies and 4832 views
Page 1 of 1 (10 items)
Sort Posts:
  • Tue, Jul 14 2009 9:35 PM

    • Vignesh054
    • Top 500 Contributor
    • Joined on Fri, Sep 26 2008
    • Hyderabad, Andhra Pradesh
    • Posts 20
    • Points 515
    How to call a Pcell? Reply

    Hi,

     Can sombody tell me how to call a pcell?

     Thanks,

    Vignesh T K 

    • Post Points: 20
  • Wed, Jul 15 2009 12:35 AM

    Re: How to call a Pcell? Reply

    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().

    Regards,

    Andrew.

    • Post Points: 20
  • Thu, Aug 6 2009 11:39 PM

    • Vignesh054
    • Top 500 Contributor
    • Joined on Fri, Sep 26 2008
    • Hyderabad, Andhra Pradesh
    • Posts 20
    • Points 515
    Re: How to call a Pcell? Reply

    Hi,

    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.

    • Post Points: 20
  • Fri, Aug 7 2009 5:59 AM

    • skillUser
    • Top 10 Contributor
    • Joined on Fri, Sep 19 2008
    • Austin, TX
    • Posts 2,595
    • Points 16,045
    Re: How to call a Pcell? Reply

     Hi,

    The dbCreateParamInst() function  provides syntax for supplying parameters, it is an optional argument ( l_params in the documentation):

    dbCreateParamInst(
     d_cellView
     d_master
     t_name
     l_point
     t_orient
     [ x_numInst
     [ l_params
     [ 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.

    Best regards,

    Lawrence.

    Filed under: ,
    • Post Points: 20
  • Sun, Aug 9 2009 11:27 PM

    • Vignesh054
    • Top 500 Contributor
    • Joined on Fri, Sep 26 2008
    • Hyderabad, Andhra Pradesh
    • Posts 20
    • Points 515
    Re: How to call a Pcell? Reply

    Hi,

    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? 

     

    Thanks,

    Vignesh T k 

    • Post Points: 20
  • Mon, Aug 10 2009 7:48 AM

    • dmay
    • Top 25 Contributor
    • Joined on Thu, Jul 17 2008
    • Allen, TX
    • Posts 396
    • Points 7,445
    Re: How to call a Pcell? Reply

    http://sourcelink.cadence.com/docs/files/Release_Info/Docs/skdfref/skdfref07.02/chap2.html

    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 Virtuoso
    2. 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~>name
    To just see the current values:
    css()~>master~>parameters~>value~>value
    To 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)

    Derek

    • Post Points: 20
  • Tue, Aug 11 2009 12:54 AM

    • Vignesh054
    • Top 500 Contributor
    • Joined on Fri, Sep 26 2008
    • Hyderabad, Andhra Pradesh
    • Posts 20
    • Points 515
    Re: How to call a Pcell? Reply

    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,

    Vignesh T K 

    • Post Points: 20
  • Thu, Aug 13 2009 7:58 AM

    • dmay
    • Top 25 Contributor
    • Joined on Thu, Jul 17 2008
    • Allen, TX
    • Posts 396
    • Points 7,445
    Re: How to call a Pcell? Reply

    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.

     Derek

    • Post Points: 20
  • Fri, Aug 14 2009 12:54 AM

    • Vignesh054
    • Top 500 Contributor
    • Joined on Fri, Sep 26 2008
    • Hyderabad, Andhra Pradesh
    • Posts 20
    • Points 515
    Re: How to call a Pcell? Reply

     Hi,

    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 parseAsCEL nil)

    (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?

    • Post Points: 20
  • Fri, Aug 14 2009 5:48 AM

    • dmay
    • Top 25 Contributor
    • Joined on Thu, Jul 17 2008
    • Allen, TX
    • Posts 396
    • Points 7,445
    Re: How to call a Pcell? Reply

    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 instance
    3. 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.

    Derek

     

    • Post Points: 5
Page 1 of 1 (10 items)
Sort Posts:
Started by Vignesh054 at 14 Jul 2009 09:35 PM. Topic has 9 replies.