• 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. Schematic PCELL does not update

Stats

  • Locked Locked
  • Replies 1
  • Subscribers 143
  • Views 3637
  • 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

Schematic PCELL does not update

Elisa9
Elisa9 over 1 year ago

Hello, I want to create a schematic pcell, in particular it must instantiate a certain number of component (let's say, switches) and then varying the values of the parameters of these components (for example their vopen, vclose) based on external parameters of the pcell. I don't know what I am doing wrong, but the pcell is stuck at its def values, even if I change the cdf parameters that I defined. I can see cdf parameters when I instantiate the cell but even if I change their values, Vopen and Vclose are still the same in the instance. Here's a simple version of my code, that already doesn't work:

constructor.il

procedure( CCScreatePcell3(cv Von Voff)

let( ()

mstr=dbOpenCellViewByType("analogLib" "switch" "symbol" "schematicSymbol" "r")

switchID=nil

switchID = cons(

inst = dbCreateInst(

cv

mstr

printf( nil "I%d" i)

0:i

"R0"

1

)

switchID

)

inst->vt1 = Von

inst->vt2 = Voff

) ;let

) ;procedure

cdf.il

let( ( libId cellId cdfId )

unless( cellId = ddGetObj( "mylib" "myCell3" )

error( "Could not get cell %s." "myCell3")

)

when( cdfId = cdfGetBaseCellCDF( cellId )

cdfDeleteCDF( cdfId )

)

cdfId = cdfCreateBaseCellCDF( cellId )

cdfCreateParam( cdfId

?name "Von"

?prompt "Von"

?defValue 1

?type "float"

)

cdfCreateParam( cdfId

?name "Voff"

?prompt "Voff"

?defValue 1

?type "float"

)

cdfSaveCDF( cdfId )

)

pcell.il

cdf=cdfGetBaseCellCDF(ddGetObj("mylib" "myCell3"))

pcDefinePCell(

list( ddGetObj("mylib") "myCell3" "schematic" "schematic")

list((Von cdf->Von->defValue) (Voff cdf->Voff->defValue))

let( (cv)

cv=pcCellView

CCScreatePcell3(cv Von Voff)

schPinListToSymbol("mylib" "myCell3" "symbol" schSchemToPinList("mylib" "myCell3" "schematic"))

) ;let

) ;pcDefinePCell

  • Cancel
Parents
  • Andrew Beckett
    Andrew Beckett over 1 year ago

    There were a few mistakes in the code which would have meant that the code wouldn't produce a schematic PCell at all (because of the commented items I fixed). With this, it works (it's not very useful as the connectivity isn't set up, but the parameter passing is working OK):

    ; constructor.il
    procedure( CCScreatePcell3(cv Von Voff)
      ; variable i was not defined - so set it arbitrarily to 4
      let( ((i 4))
        mstr=dbOpenCellViewByType("analogLib" "switch" "symbol" "schematicSymbol" "r")
        switchID=nil
        switchID = cons(
          inst = dbCreateInst(
            cv
            mstr
            ; this was printf - should have been sprintf
            sprintf( nil "I%d" i)
            0:i
            "R0"
            1
          )
        switchID
        )
        inst->vt1 = Von
        inst->vt2 = Voff
      ) ;let
    ) ;procedure

    ; cdf.il
    let( ( libId cellId cdfId )
      ; add some arguments to create the object if the cell doesn't exist
      ; otherwise the CDF won't be created first time around
      unless( cellId = ddGetObj( "mylib" "myCell3" nil nil nil "a" )
        error( "Could not get cell %s." "myCell3")
      )
      when( cdfId = cdfGetBaseCellCDF( cellId )
        cdfDeleteCDF( cdfId )
      )
      cdfId = cdfCreateBaseCellCDF( cellId )
      cdfCreateParam( cdfId
        ?name "Von"
        ?prompt "Von"
        ?defValue 1
        ?type "float"
      )
      cdfCreateParam( cdfId
        ?name "Voff"
        ?prompt "Voff"
        ?defValue 1
        ?type "float"
      )
      cdfSaveCDF( cdfId )
    )


    ; pcell.il
    cdf=cdfGetBaseCellCDF(ddGetObj("mylib" "myCell3"))
    pcDefinePCell(
      list( ddGetObj("mylib") "myCell3" "schematic" "schematic")
      list((Von cdf->Von->defValue) (Voff cdf->Voff->defValue))
      let( (cv)
        cv=pcCellView
        CCScreatePcell3(cv Von Voff)
      ) ;let
    ) ;pcDefinePCell
    
    ; move to outside of the PCell - you shouldn't have the symbol being created
    ; within the schematic PCell (it would need write access otherwise)
    schPinListToSymbol("mylib" "myCell3" "symbol" schSchemToPinList("mylib" "myCell3" "schematic"))
    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Reply
  • Andrew Beckett
    Andrew Beckett over 1 year ago

    There were a few mistakes in the code which would have meant that the code wouldn't produce a schematic PCell at all (because of the commented items I fixed). With this, it works (it's not very useful as the connectivity isn't set up, but the parameter passing is working OK):

    ; constructor.il
    procedure( CCScreatePcell3(cv Von Voff)
      ; variable i was not defined - so set it arbitrarily to 4
      let( ((i 4))
        mstr=dbOpenCellViewByType("analogLib" "switch" "symbol" "schematicSymbol" "r")
        switchID=nil
        switchID = cons(
          inst = dbCreateInst(
            cv
            mstr
            ; this was printf - should have been sprintf
            sprintf( nil "I%d" i)
            0:i
            "R0"
            1
          )
        switchID
        )
        inst->vt1 = Von
        inst->vt2 = Voff
      ) ;let
    ) ;procedure

    ; cdf.il
    let( ( libId cellId cdfId )
      ; add some arguments to create the object if the cell doesn't exist
      ; otherwise the CDF won't be created first time around
      unless( cellId = ddGetObj( "mylib" "myCell3" nil nil nil "a" )
        error( "Could not get cell %s." "myCell3")
      )
      when( cdfId = cdfGetBaseCellCDF( cellId )
        cdfDeleteCDF( cdfId )
      )
      cdfId = cdfCreateBaseCellCDF( cellId )
      cdfCreateParam( cdfId
        ?name "Von"
        ?prompt "Von"
        ?defValue 1
        ?type "float"
      )
      cdfCreateParam( cdfId
        ?name "Voff"
        ?prompt "Voff"
        ?defValue 1
        ?type "float"
      )
      cdfSaveCDF( cdfId )
    )


    ; pcell.il
    cdf=cdfGetBaseCellCDF(ddGetObj("mylib" "myCell3"))
    pcDefinePCell(
      list( ddGetObj("mylib") "myCell3" "schematic" "schematic")
      list((Von cdf->Von->defValue) (Voff cdf->Voff->defValue))
      let( (cv)
        cv=pcCellView
        CCScreatePcell3(cv Von Voff)
      ) ;let
    ) ;pcDefinePCell
    
    ; move to outside of the PCell - you shouldn't have the symbol being created
    ; within the schematic PCell (it would need write access otherwise)
    schPinListToSymbol("mylib" "myCell3" "symbol" schSchemToPinList("mylib" "myCell3" "schematic"))
    • 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