• 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. Instantiate a device with terminal names (SKILL)

Stats

  • Locked Locked
  • Replies 1
  • Subscribers 144
  • Views 14410
  • 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

Instantiate a device with terminal names (SKILL)

PietroUser
PietroUser over 11 years ago

I have the following code to instantiate an nmos transistor in a schematic:

 ; Open the CV to create
cvId=dbOpenCellViewByType("Test_Structures" "Rects1" "schematic" "schematic" "w")
 ; Open the master cell to instatiate
mosId = dbOpenCellViewByType("analogLib" "nmos4" "symbol" "schematicSymbol" "r")


Inst=dbCreateInst(cvId mosId nil '(0 0) "R0" 1)
;schCreateWire( cvId "draw" "full" list(0:0 1:0) 0.0625 0.0625 0.0 )
;schCreateWireLabel(

;to save and close:
dbSave(cvId)
dbClose(cvId)

 

I would like to add wires and labels to obtain the result as in the attached picture.

Thanks,

Pietro

 

 

 

 

  • Capture.JPG
  • View
  • Hide
  • Cancel
Parents
  • skillUser
    skillUser over 11 years ago

    Hi Pietro,

    I don't have an exact example to hand, but the code section below may help you

    ...
    inst=dbCreateInst(cvId mosId nil '(0 0) "R0" 1)
    
    ;; put the wire stubs in yourself using schCreateWire in 'direct' mode
    ;; then create the labels - you might wish to attach the labels to the
    ;; wire segments, in which case, use schCreateWireLabel as above and
    ;; provide the wire as the 'd_glue' argument
    
    ;; this just creates labels right on the center of the instance pins
    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
    

    The main thing here is that the pin center is obtained in the code above - you would need to work out which direction to extend the wire in and perhaps place the label along the wire, but the above should give you a good starting point.

    Regards,

    Lawrence.

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

    Hi Pietro,

    I don't have an exact example to hand, but the code section below may help you

    ...
    inst=dbCreateInst(cvId mosId nil '(0 0) "R0" 1)
    
    ;; put the wire stubs in yourself using schCreateWire in 'direct' mode
    ;; then create the labels - you might wish to attach the labels to the
    ;; wire segments, in which case, use schCreateWireLabel as above and
    ;; provide the wire as the 'd_glue' argument
    
    ;; this just creates labels right on the center of the instance pins
    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
    

    The main thing here is that the pin center is obtained in the code above - you would need to work out which direction to extend the wire in and perhaps place the label along the wire, but the above should give you a good starting point.

    Regards,

    Lawrence.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Children
No Data

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