• 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. dbCreateInstTerm: Terminal not in instance's master

Stats

  • Locked Locked
  • Replies 4
  • Subscribers 143
  • Views 2977
  • 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

dbCreateInstTerm: Terminal not in instance's master

morrris
morrris over 4 years ago

Hi, Cadence Family

I've created a cell named inva_lv, with dbMakeNet, dbCreateTerm, dbCreatePin for symbol view

; pcell: inva_lv

dbMakeNet(pcCV "VPP")

dbCreateTerm(dbFindNetByName(pcCV "VPP") dbFindNetByName(pcCV "VPP")->name "inputOutput")

dbCreatePin(dbFindNetByName(pcCV "VPP") dbCreateRect(pcCV '("pin" "drawing") list(1-hp:1-hp 1+hp:1+hp)))

Then I try to create inva_lv in another schematic pcCellView with dbOpenCellViewByType, dbCreateInst like below

; another pcell
masterIopinCv=dbOpenCellViewByType("basic" "iopin" "symbolr" nil "r")

dbCreateNet(pcCV "VPP")


dbCreateTerm(dbFindNetByName(pcCV "VPP") dbFindNetByName(pcCV "VPP")->name "inputOutput")

dbCreatePin(dbFindNetByName(pcCV "VPP") dbCreateInst(pcCV masterIopinCv "VPP" 1:1 "R0"))

masterCv=dbOpenCellViewByType("test" "inva_lv" "symbol" nil "r")

instId=dbCreateInst(pcCV masterCv "X0" 1:1 "R0" 1)

dbCreateInstTerm(dbFindNetByName(pcCV "VPP") instId dbFindTermByName(masterCv "VPP"))

CIW says "WARNING (DB-270000) :dbCreateInstTerm: Terminal not in instance's master"

Then the pin "VPP" in created inverter cannot be assign Net Name like below

So, I try to replace inva_lv by analogLib/pmos4

It's work like below

Am I missing something to build?

How can I fix it ?

Your help will be appreciated.

Virtuoso version IC6.1.7-64b.500.21

  • Cancel
  • Andrew Beckett
    Andrew Beckett over 4 years ago

    I took your code segments and added a little boilerplate before and after:

    forumsym.il

    let((pcCV (hp 0.0625))
        pcCV=dbOpenCellViewByType("mylib" "inva_lv" "symbol" "schematicSymbol" "w")
        ; pcell: inva_lv
    
        dbMakeNet(pcCV "VPP")
    
        dbCreateTerm(dbFindNetByName(pcCV "VPP") dbFindNetByName(pcCV "VPP")->name "inputOutput")
    
        dbCreatePin(dbFindNetByName(pcCV "VPP") dbCreateRect(pcCV '("pin" "drawing") list(1-hp:1-hp 1+hp:1+hp)))
        dbSave(pcCV)
    )
    
    

    forumsch.il

    let((masterIopinCV pcCV masterCv instId)
    
        pcCV=dbOpenCellViewByType("mylib" "testinvsch" "schematic" "schematic" "w")
        ; another pcell
        masterIopinCv=dbOpenCellViewByType("basic" "iopin" "symbolr" nil "r")
    
        dbCreateNet(pcCV "VPP")
    
        dbCreateTerm(dbFindNetByName(pcCV "VPP") dbFindNetByName(pcCV "VPP")->name "inputOutput")
    
        dbCreatePin(dbFindNetByName(pcCV "VPP") dbCreateInst(pcCV masterIopinCv "VPP" 1:1 "R0"))
    
        masterCv=dbOpenCellViewByType("mylib" "inva_lv" "symbol" nil "r")
    
        instId=dbCreateInst(pcCV masterCv "X0" 1:1 "R0" 1)
    
        dbCreateInstTerm(dbFindNetByName(pcCV "VPP") instId dbFindTermByName(masterCv "VPP"))
    
        dbSave(pcCV)
    )

    If I do this:

    load("forumsym.il")
    load("forumsch.il")

    I have no warnings or errors, and if I open up the resulting schematic (mylib/testinvsch/schematic) then it's connected OK (there is an instTerm and it's connected to VPP).

    So I think your problem must be outside the code segments you've shared. I tried this in the same version as you too (in the unlikely situation that it would break in that version - given that nothing here is particularly unusual, that seems unlikely).

    Sure, my cases aren't PCells, but I don't see why that would make any difference.

    Regards,

    Andrew

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • morrris
    morrris over 4 years ago in reply to Andrew Beckett

    Hi, Andrew

    It's my full code.

    First, it's pcell for inverter and only create symbol view.

    /* inv.il
    - inverter pcell
    Author Morrris
    Machine CentOS
    Date Jun 15, 2021
    Modified **
    By **
    ************************************/

    cellList='( "inva_lv")
    sizeList='( "1" )
    for(i 0 length(cellList)-1
    let((cell library pcellId)
    cell=nth(i cellList)
    library="test"

    ;{{{Symbol
    pcellId=pcDefinePCell(
    list(ddGetObj(library) cell "symbol" "schematicSymbol")
    ;Formal parameters
    (
    (size nth(i sizeList)) (cell nth(i cellList))
    )

    ;Build itself
    let((pcCV hp ss label)
    pcCV=pcCellView
    hp=0.025 ;half pin size
    ss=0.00625 ;snap spacing

    ;Line
    dbCreateLine(pcCV '("device" "drawing") list(0:0 0.1875:0))
    dbCreateLine(pcCV '("device" "drawing") list(0.5:0 0.1875:0.1875 0.1875:-0.1875 0.5:0))
    dbCreateLine(pcCV '("device" "drawing") list(0.5625:0 0.75:0))
    dbCreateEllipse(pcCV '("device" "drawing") list(0.53125-0.03125:0-0.03125 0.53125+0.03125:0+0.03125))
    ;Select Box
    dbCreateRect(pcCV list("instance" "drawing") list(0:-0.1875 0.75:0.1875))

    ;Label
    label=dbCreateLabel(pcCV list("annotate" "drawing7") 0.125:0.25 "cdsName()" "centerRight" "R0" "stick" 0.0625)
    label->labelType="ILLabel"
    label=dbCreateLabel(pcCV list("annotate" "drawing4") 0.125:0.1875 "[@cellName]" "upperRight" "R0" "stick" 0.0625)
    label->labelType="NLPLabel"

    ;Pin
    dbCreatePin(dbMakeNet(pcCV "VPP") dbCreateRect(pcCV '("pin" "drawing") list(0.375-hp:0.1875-hp 0.375+hp:0.1875+hp)))
    dbCreatePin(dbMakeNet(pcCV "VGG") dbCreateRect(pcCV '("pin" "drawing") list(0.375-hp:-0.1875-hp 0.375+hp:-0.1875+hp)))
    dbCreatePin(dbMakeNet(pcCV "A") dbCreateRect(pcCV '("pin" "drawing") list(0-hp:0-hp 0+hp:0+hp)))
    dbCreatePin(dbMakeNet(pcCV "QB") dbCreateRect(pcCV '("pin" "drawing") list(0.75-hp:0-hp 0.75+hp:0+hp)))
    dbFindNetByName(pcCV "VPP")->term->direction="inputOutput"
    dbFindNetByName(pcCV "VGG")->term->direction="inputOutput"
    dbFindNetByName(pcCV "A")->term->direction="input"
    dbFindNetByName(pcCV "QB")->term->direction="output"

    dbCreateLine(pcCV '("device" "drawing") list(0.375:0.1875 0.375:0.075))
    label=dbCreateLabel(pcCV '("pin" "drawing") 0.375-hp:0.1875-hp "VPP" "centerRight" "R0" "stick" 0.03125)
    label->labelType="NLPLabel"
    dbCreateLine(pcCV '("device" "drawing") list(0.375:-0.075 0.375:-0.1875))
    label=dbCreateLabel(pcCV '("pin" "drawing") 0.375-hp:-0.1875+hp "VGG" "centerRight" "R0" "stick" 0.03125)
    label->labelType="NLPLabel"

    );end let
    );end pcDefinePCell
    pcellId->instNamePrefix="X"
    dbSave(pcellId) dbClose(pcellId)
    ;}}}Symbol

    );let
    );for

    Then it's schematic to add inverter cell which created by SKILL code

    /* test.il

    Author Morrris
    Machine CentOS
    Date Jul 02, 2021
    Modified **
    By **
    ************************************/

    let((library pcellId)
    library="test"

    unless(ddGetObj(library) error("Couldn't open library %L" library))
    ;{{{Schematic
    pcellId=pcDefinePCell(
    list(ddGetObj(library) "test" "schematic" "schematic")
    ;Formal parameters
    (
    )

    ;Build itself
    let((pcCV tsx tsy instInvId)
    pcCV=pcCellView
    tsx=0.0625 ;x space
    tsy=0.04375 ;y space
    masterIopinCv=dbOpenCellViewByType("basic" "iopin" "symbolr" nil "r")
    masterIpinCv=dbOpenCellViewByType("basic" "ipin" "symbol" nil "r")
    masterOpinCv=dbOpenCellViewByType("basic" "opin" "symbol" nil "r")
    dbCreateNet(pcCV "VPP")
    dbCreateTerm(dbFindNetByName(pcCV "VPP") dbFindNetByName(pcCV "VPP")->name "inputOutput")
    dbCreatePin(dbFindNetByName(pcCV "VPP") dbCreateInst(pcCV masterIopinCv "VPP" 1-tsx:1.375 "R0"))
    masterInvCv=dbOpenCellViewByType("test" "inva_lv" "symbol" nil "r")
    setq(x 2) setq(y 2)
    instInvId=dbCreateInst(pcCV masterInvCv "X0" (x:y) "R0" 1)
    dbCreateInstTerm(dbFindNetByName(pcCV "VPP") instInvId dbFindTermByName(masterInvCv "VPP"))

    dbClose(masterIopinCv)
    dbClose(masterIpinCv)
    dbClose(masterOpinCv)
    dbClose(masterInvCv)
    t
    );end let
    );}}}end pcDefinePCell
    dbSave(pcellId) dbClose(pcellId)
    );let

    And load inv.il and test.il will show the warning mesage as mentioned before.

    The pin "VPP" in inva_lv still cannot connect to VPP.

     version IC6.1.7-64b.500.21

    Regards,

    Morrris

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 4 years ago in reply to morrris

    Morris,

    The fact that the instance is a PCell makes all the difference - I should have spotted this earlier but having a real example always helps focus the mind. Anyway, the problem was that you pass the superMaster of a pCell to dbCreateInst, but it actually binds to a subMaster (the specific variant) and that's what you need to use to find the terminal. In this case it happens to be the subMaster with all the default parameter values, but it is still a subMaster. So here's the code fix in test.il :

          ;; this is finding the terminal in the superMaster, rather than the subMaster (variant) of the PCell that
          ;; is bound to the instance
          ;dbCreateInstTerm(dbFindNetByName(pcCV "VPP") instInvId dbFindTermByName(masterInvCv "VPP"))
          ;; so instead use instInvId~>master to look up the terminal
          dbCreateInstTerm(dbFindNetByName(pcCV "VPP") instInvId dbFindTermByName(instInvId~>master "VPP"))
    

    Regards,

    Andrew

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • morrris
    morrris over 4 years ago in reply to Andrew Beckett

    Hi, Andrew

    Thank you for reply.

    I get it ! Helps me a lot !

    • 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