• 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. Cannot call pPar for CDF parameter

Stats

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

Cannot call pPar for CDF parameter

farhan89
farhan89 over 8 years ago

Hello,

I wrote a pcell for layout and Symbol view for nmos. There are only 2 parameters that user can define (W and L). These CDF parameters have simple call backs functions to check that value in non zero. When I place the instance of nmos symbol in another schematic and edit the parameters at pPar("W") and pPar("W") then I get the error that:

*WARNING* cdfiSetParamValueOnInst: Could not get a float from property 'W' on instance 'I2'

CDF: An error occurred when evaluating callback.

Callback: W->callback => CheckLW(cdfgData->W)

Message: *Error* eval: undefined function - pPar


I tried changing the formal parameters of symbol view as:
 (
        (W           string   "75e-6"     ) ;; Channel Width
        (L            string  "20e-6"     ) ;; Channel Length
    )

but still it doesn't accept the input as pPar. Can anyone help me what should I modify in CDF parameters to make pPar work ?

My CDF parameter code
    cdfCreateParam( cdfId
        ?name "W"
        ?prompt "Channel width"
        ?defValue "100e-6"
        ?type "string"
        ?display "t"
        ?parseAsNumber "t"
        ?units "lengthMetric"
        ?callback "CheckLW(cdfgData->W)"
        ?storeDefault "yes"
    ?parseAsCEL "yes"
    )
    cdfCreateParam( cdfId
        ?name "L"
        ?prompt "Channel length"
        ?defValue "20e-6"
        ?type "string"
        ?display "t"
        ?parseAsNumber "t"
        ?units "lengthMetric"
        ?callback "CheckLW(cdfgData->L)"
        ?storeDefault "yes"
    ?parseAsCEL "yes"
    )

Thanks

Farhan

  • Cancel
  • Andrew Beckett
    Andrew Beckett over 8 years ago

    Hi Farhan,

    OK, several things here:

    1. Do you really need your symbol to be a pcell - that's relatively unusual (does it change the symbol dependent upon the parameters?)
    2. It looks as if the main problem is that your callback is trying to evaluate the value of the CDF parameter (at a guess - you didn't show what that function does). This is doomed to failure - see this article on the Dangers of CDF callbacks
    3. pPar in general is fine - just you can't expect the callback to be able to evaluate it - you'd typically have to ensure that it just tolerates it, or write a PDK that doesn't depend on CDF callbacks to derive values. If your callbacks are just checking values (as the name suggests in your case), then they could just suspend doing that check if it looks like an expression of some sort - i.e. isn't a literal value.
    4. You should give your callback function a name that distinguishes it from other functions - e.g. a unique prefix.
    5. The ?parseAsNumber argument values should be "yes" not "t".

    Regards,

    Andrew

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • farhan89
    farhan89 over 8 years ago

    Thank you Andrew for suggestions and explanation.

     I don't really need a pcell for symbol view (because it doesn't change depending upon parameters). The reason why I created pcell for symbol view is to attach the CDF parameters(e.g. W and L), terminal and net names to it and modify CDF parameters for symbol view while designing circuit.


     This is my callback procedure

    procedure(CheckLW(paramId)
    prog((val valVar)
    if( (val = cdfParseFloatString(paramId->value)) &&
    typep(val) != 'flonum then
    paramId->value = val
    cdfgForm->cdfModified = t
    )
    if(paramId->value=="" || evalstring(paramId->value) < evalstring(paramId->defValue) then
    paramId->value = paramId->defValue
    cdfgForm->cdfModified = t
    )
    );; prog
    )

    According to my understanding the cdfParseFloatString() function would accept pPar function for CDF parameters. I am using IC6.1.6-64b.500.8 version. Could you please suggest me what should I edit in my callback script to accept the pPar("W") and pPar("L") for symbol view and not for the layout view.

    Farhan

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 8 years ago

    Farhan,

    cdfParseFloatString doesn't understand pPar(). I'm not sure why you think it would? If you'd read my "Dangers of CDF Callbacks" article that I referenced earlier, it probably would have been clear that you can't have a CDF callback which works this way, because CDF callbacks are evaluated when the properties of an instance are edited; even if you used the information about the particular hierarchical path you've pushed into (using aelSetLineage and aelEnvCompile/aelEnvExecute, for example), it would only be valid for that one occurrence - there could be other hierarchical occurrences which inherit different values - and so your callback results would be wrong.

    I still don't see why having a pcell helps - this is just a CDF callback question - and you are trying to do something that CDF callbacks really cannot handle (as described in my article).

    Kind Regards,

    Andrew.

    • 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