• Skip to main content
  • Skip to search
  • Skip to footer
Cadence Home
  • This search text may be transcribed, used, stored, or accessed by our third-party service providers per our Cookie Policy and Privacy Policy.

  1. Community Forums
  2. Custom IC SKILL
  3. Reading PCell Properties/Parameters using SKILL

Stats

  • Locked Locked
  • Replies 12
  • Subscribers 145
  • Views 7249
  • Members are here 0
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Reading PCell Properties/Parameters using SKILL

frasheed
frasheed over 11 years ago

 Hello All,

I have a PCell that has nfet layout and I am writing a SKILL code to open the layout and label the Gate, Drain, Source and Bulk in layout. For that I need to read the parameters that where is the Gate, Drain and Sourcein layout. I tried some commands like :

pcGetParameters , pcGetParamLabelDefn, pcGetParamLabels, pcGetParamLayers but all of them are given me "Nil". Can anyone help me what's wrong ? Is it because the PCell doesn't have any properties ?

or is there any better way for labeling ?

Thanks

P.S: I didn't created that PCell and I am very beginner to SKILL.

 

  • Cancel
  • skillUser
    skillUser over 11 years ago

     Hi there,

    The commands that you list would most likely be used with a graphical PCell rather than a SKILL PCell. I'm a little confused by your question, is the PCell an nfet itself, or does it instantiate an instance of an nfet inside the PCell?  Also, the terminals (G, D, S, B) are not parameters; these will be physical shapes that are associated with pins, nets and terminals (these last three are all logical database objects).

    If I understand you correctly you wish to label the terminals - this can be achieved in one of two ways: create labels within the PCell code, or label the terminals on the (each) instance. It may be possible that the instance pin names can be 'turned on' using the Options -> Display "Pin Names" setting, though I think this might apply to terminals in the layout rather than the instance terminalson instances...

    If you can clarify a bit more about what you have then hopefully we (forum members) may be able to help you.

    Regards,

    Lawrence.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • frasheed
    frasheed over 11 years ago

    Hi Lawrance,the pcell instantiate an instance of an nfe. What I did I open the layout editor and pressed the "i" button and then I selcted the library, cell and layout of nfet and when I placed it in editor its a pcell. Now this pcell is actually instance of nfet and I want to label the D G S on terminals. 

    I tried Options->Dsiplay "pin names" but its not showing anything. Any way that I read information regarding where is drain where is gate and source so that I can write a code to label that part?

    Thanks

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • skillUser
    skillUser over 11 years ago

    Hi,

    I'm still a bit confused - in one sentence you say that the PCell instantiates an nfet, and then in another you say that the nfet cell is a PCell (and both of these could be true, since a PCell can contain an instance of another PCell...).

    Never mind though, it should not matter too much.  Your code might look something like this:

    procedure(CCFaddInstPinLabels(@optional (cellView geGetEditCellView()))
    let( (transform pinCenter)
      foreach( inst cellView~>instances
        transform=inst~>transform
        foreach( instTerm inst~>instTerms
          foreach( pin instTerm~>term~>pins
            pinCenter=centerBox(pin~>fig~>bBox)
            dbCreateLabel(cellView list("text" "drawing")
              dbTransformPoint(pinCenter transform)
              strcat("n" instTerm~>name)
              "centerCenter"
              "R0" "stick"
    	  0.0625
            ); dbCreateLabel
          ); foreach pin
        ); foreach instance terminal
      ); foreach instance
    );let
    ); procedure CCFaddInstPinLabels
    

    Hopefully this is close to what you want?  It creates a label "n<terminalName>" on the center of each pin figure of the instances in the current cellview when you invoke CCFaddInstPinLabels() in the CIW.

    Regards,

    Lawrence.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • frasheed
    frasheed over 11 years ago

     Hi,

    Thanks for your reply, Since I am very new to Skill and Layout Designing so I didn't explain you very well sorry for that. 

    I converted schematic to layout, and your code is working fine Thanks
    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • frasheed
    frasheed over 11 years ago

     Hi Lawrence,

    I had the instance terminal name for bulk but no pin for that so I modified your code and created the pin for bulk and assigned to bulk. Now your code is like :

     procedure(CCFaddInstPinLabels(@optional (cellView geGetEditCellView()))
    let( (transform pinCenter)
      foreach( inst cellView~>instances
        transform=inst~>transform
        foreach( instTerm inst~>instTerms
        if(instTerm~>name == "b"
        then
            tf=techGetTechFile(cellView)
        viaDef=techFindViaDefByName(tf "RXNWCAM1")
        b_db = dbCreateVia(cellView viaDef 0.2:0.4 "R0")
        b_pin = dbCreatePin(instTerm~>net b_db "b")
        instTerm = b_pin
         );if
          foreach( pin instTerm~>term~>pins
          pinCenter=centerBox(pin~>fig~>bBox)
          dbCreateLabel(cellView list("M1" "label")
              if(pin~>name == "b"
              then
              dbTransformPoint(pinCenter list(0:0 "R0")) ;No transformation for Bulk
              else
              dbTransformPoint(pinCenter transform)
              );if
              strcat("n" instTerm~>name)
              "centerCenter"
              "R0" "stick"
          0.0625
            ); dbCreateLabel
          ); foreach pin
        ); foreach instance terminal
      ); foreach instance
    );let
    ); procedure CCFaddInstPinLabels

    CCFaddInstPinLabels()

    I have a two queries regarding this code . In your dbCreateLabel(cellView list("text" "drawing") it creates label on text layer and pupose is drawing, I want label on the respective layer, like if drain is on M1 then label should be on M1 and the gate is on M2 then Lable should be in M2, any command to read the pin layer?

    and in dbCreateVia(cellView viaDef 0.2:0.4 "R0"), I used the fixed co-ordinates for via, but I want to use the co-ordinates of pcell instance and I want to place via near pcell ?

    will inst~>transform will help ?

    Thanks

     

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • theopaone
    theopaone over 11 years ago

     For the label layers, get the lpp from the pin and use it to create the label:

    dbCreateLabel( cellView pin~>fig~>lpp...)

    For performance, since you are already checking the instTerm~>name=="b", you can create the bulk pin in that if statement and not have to execute a conditional statement inside the loop.

     You already have the instance transform for the instance: transform=inst~>transform. use dbConcatTransform to calculate the offset for the via placement.

    Ted

     

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • frasheed
    frasheed over 11 years ago

     Hey Ted,

    Thanks for your reply, I edited my code like this:

    procedure(CCFaddInstPinLabels(@optional (cellView geGetEditCellView()))
    let( (transform pinCenter)
      foreach( inst cellView~>instances
        transform=inst~>transform
        foreach( instTerm inst~>instTerms
        if(instTerm~>name == "b"
        then
            tf=techGetTechFile(cellView)
        viaDef=techFindViaDefByName(tf "RXNWCAM1")
        b_db = dbCreateVia(cellView viaDef 0.2:0.4 "R0")
        b_pin = dbCreatePin(instTerm~>net b_db "b")
        cellView~>instances~>instTerms~>term~>pins = subst(b_pin '(nil) cellView~>instances~>instTerms~>term~>pins) ;; update bulk pin db in cellview properties

         );if
          foreach( pin instTerm~>term~>pins
          pinCenter=centerBox(pin~>fig~>bBox)
          dbCreateLabel(cellView list("M1" "label")
              if(pin~>name == "b"
              then
              dbTransformPoint(pinCenter list(0:0 "R0")) ;No transformation for Bulk
              else
              dbTransformPoint(pinCenter transform)
              );if
              strcat("n" instTerm~>name)
              "centerCenter"
              "R0" "stick"
          0.0625
            ); dbCreateLabel
          ); foreach pin
        ); foreach instance terminal
      ); foreach instance
    );let
    ); procedure CCFaddInstPinLabels

    CCFaddInstPinLabels()

     but substitution command it's substitutiong the db for bulk to the nil value but when I try to retreve pin~>name then virtuoso is crashing.

    and 1 more thing I have noticed that before substiutiong the list is 

    (((db:0x16ddb39b) (db:0x16ddb39d db:0x16ddb39c) (db:0x16ddb39a) nil))

     

    after subst(b_pin '(nil) cellView~>instances~>instTerms~>term~>pins) the values are

     

    (((db:0x16ddb39b) (db:0x16ddb39d db:0x16ddb39c) (db:0x16ddb39a) . db:0x16dda11a))

     

    there is a '.' (dot) before last db , this might be the reason virtuoso is crashing ? if so how to remove that ?

    (((db:0x16ddb39b) (db:0x16ddb39d db:0x16ddb39c) (db:0x16ddb39a) . db:0x16dda11a))

     

    how can I set it with dbSetq? I am confused at the input values fro dbSetq

    thanks

     

     

     

     

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • theopaone
    theopaone over 11 years ago

     cellView~>instances~>instTerms~>term~>pins = subst(b_pin '(nil) cellView~>instances~>instTerms~>term~>pins)

    Something in this line is messing up the instTerms on your instances. You are doing a global update inside a loop that is processing individual instances. I'm kind of confused as to why you would do this, so is Virtuoso.

    Ted

     

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • frasheed
    frasheed over 11 years ago

    Hey Ted,

    Thanks for your reply.

     

    [UPDATE]: I just read in skdref.pdf that under terminal, pins attributes can't be modified

    so how I can I update pins in my cell after creating the bulk pin?

    I know this command can solve my problem

    dbSetq(cellView~>instances~>instTerms~>term b_pin pins)

    but I cam't set pins as pins is already the property , so I need to update and I am confused how to choose that "nil" pin

     

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • theopaone
    theopaone over 11 years ago

     dbSetq(cellView~>instances~>instTerms~>term b_pin pins) is not going to work. The Virtuoso DesignEnvironment SKILL Reference IC616 is used here.

    1. The terminals pointed to by cellView~>instances~>instTerms~>term are the individual terminals inside the instance masters (Page: 1226)

    2.The instTerm jumps the hierarchy and connects the net in the current cellView (instTerm~>net) with the terminal inside the instance master (instTerm~>term). There are no pins involved, pins only mark the physical connection shapes for the cell, all hierarchical connection is done through the terminals and instTerms. In your instances, the bulk terminal has no pins and no physical connection but does have the logical connection through the bulk terminal.

    3. You cannot add a pin in the current level of the hierarchy to a terminal in the nested cellView. Connectivity does not work like that. The pin has to be a shape inside the master of the instance, not in the current level of the hierarchy.

    4. What you probably need to do, if the pin list for the terminal is nil, is either not place a label or place the label in the center of the bounding box of the instance.

    5. If the labels are supposed to stay with the instance when it is moved, transformed or deleted, either form a parent/child relationship between the instance and the labels - 5141 - (labelId~>parent = instId) or create a figGroup in IC6.x

    Ted

     

     

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
>

Community Guidelines

The Cadence Design Communities support Cadence users and technologists interacting to exchange ideas, news, technical information, and best practices to solve problems and get the most from Cadence technology. The community is open to everyone, and to provide the most value, we require participants to follow our Community Guidelines that facilitate a quality exchange of ideas and information. By accessing, contributing, using or downloading any materials from the site, you agree to be bound by the full Community Guidelines.

© 2025 Cadence Design Systems, Inc. All Rights Reserved.

  • Terms of Use
  • Privacy
  • Cookie Policy
  • US Trademarks
  • Do Not Sell or Share My Personal Information