• 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. Parameterize a schematic pcell

Stats

  • Locked Locked
  • Replies 3
  • Subscribers 143
  • Views 15397
  • 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

Parameterize a schematic pcell

KoVe
KoVe over 11 years ago

I made a schematic pcell for some schematic using technology pcell - the MOS transistors. When I enter a paremeter in the cfd field, the following warning is printed:

 

*WARNING* (DB-270002): ("times" 0 t nil ("*Error* times: can't handle (\"Wn\" * 1.0)"))

Instead of filling in the value of Wn, that is set in ADE L, the string "Wn" is passed.This causes:
  cdfFormatFloatString( sprintf(nil "%g" (cdfParseFloatString(widN)*factor) ) "n")
to isue a warning.

I understand why, because the type of the cdf parameter widN is string. But how do I make it possible for my pcell to be parametrized, like e.g. transistor pcell provided by the PDK I am using?

 

Thanks!

Relevant code:

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

load("../scripts/CCSinvokeCdfCallbacks.il")
load("../scripts/invChainCCScallbackPatternsToIgnore.il")

let( (library cell pcellID parameters)
library="Playground"
cell="TIC"
unless(ddGetObj(library)
    error("Couldn't open library %L" library)
    )


;-----------------------------------
; Schematic
;-----------------------------------

pcellID=pcDefinePCell(
    list( ddGetObj(library) cell "schematic" "schematic")
    (
        (widN             string        "120n")
    )
    let(    ( cvIDnmos )
      cvIDnmos = dbOpenCellViewByType( libname nchCellName "symbol" nil "r" )
      for( iterator 0 numberOfStages-1
        factor = stageRatio**iterator
        nmos = dbCreateParamInst( pcCellView
            cvIDnmos
            nil    2*iterator+6*ss:0     "R0" 1
            list(
                list("width"    "string"    cdfFormatFloatString( sprintf(nil "%g" (cdfParseFloatString(widN)*factor) ) "n") )
            )
            t
        )  
    )
    CCSinvokeCdfCallbacks(pcCellView ?callInitProc t ?useInstCDF t)
    dbClose(cvIDnmos)
    ); end let

);pcDefinePCell
dbSave(pcellID)
dbClose(pcellID) 

 

let( (cellID cdfID)
    unless(cellID = ddGetObj( library cell )
        error("Could not get cell %s." cell)
    )
    when(     cdfID = cdfGetBaseCellCDF( cellID )
        cdfDeleteCDF( cdfID )
    )
    cdfID  = cdfCreateBaseCellCDF( cellID )

    cdfCreateParam( cdfID
        ?name            "widN"
        ?type            "string"
        ?defValue        "120n"
        ?units            "lengthMetric"
        ?parseAsNumber    "yes"
        ?prompt        "gate width of first nmos"
        ?display        "t"
    )

);let cdf
);let

 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

  • Cancel
Parents
  • Andrew Beckett
    Andrew Beckett over 11 years ago

    Rather than trying to evaluate the parameter (which you really can't, because if it has pPar() in, they are occurrence-specific and pcell evaluation is only unique for each combination of input parameters, so it would be incorrect to evaluate them assuming a particular occurrence path), it would be better to use:

                    list("width"    "string"    sprintf(nil "pPar(\"widN\")*%g" factor))

    There's no need for widN to be a pcell parameter in this case. If this was your only pcell parameter, there's no need for it to be a pcell at all... (I'm assuming you've just simplified your example though to remove the unnecessary complexity when asking this question).

    Regards,

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Reply
  • Andrew Beckett
    Andrew Beckett over 11 years ago

    Rather than trying to evaluate the parameter (which you really can't, because if it has pPar() in, they are occurrence-specific and pcell evaluation is only unique for each combination of input parameters, so it would be incorrect to evaluate them assuming a particular occurrence path), it would be better to use:

                    list("width"    "string"    sprintf(nil "pPar(\"widN\")*%g" factor))

    There's no need for widN to be a pcell parameter in this case. If this was your only pcell parameter, there's no need for it to be a pcell at all... (I'm assuming you've just simplified your example though to remove the unnecessary complexity when asking this question).

    Regards,

    Andrew.

    • 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