• 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. Filter display and editable parameters of CDF, unbound cdfgForm...

Stats

  • Locked Locked
  • Replies 7
  • Subscribers 149
  • Views 8926
  • 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

Filter display and editable parameters of CDF, unbound cdfgForm error

FranzD
FranzD over 2 years ago

Hi,

want to generate some variation values for a cell. For this I want to filter out at first which CDF parameters are editable and can be displayed. When I try to check the display condition of the CDF parameters I got an 

*Error* eval: unbound variable - cdfgForm. And I dont understand why. My code is the following:

cdf = CCSgetCdfForCell(pdkLibName cell)
callFilt = CCSinvokeObjCdfCallbacks(cdf
?callInitProc t
)
params = cdf~>parameters

foreach(param params
if(param~>display then
   if(type(param~>display)=='string then
      display = evalstring(param~>display)
      );if display string
else

        ; display not definded
    display = t
);if display

If you have any suggestions how to do the wanted task in an another way or can help me fix my error I would be very glad.

Thanks,

Franz

  • Cancel
  • FranzD
    FranzD over 2 years ago

    So I manged to remove the cdfgFrom Error by setting cdfgForm = cdf (I used  setq(cdfgForm cdf) which should be the same)

    But I tought that the function CCSinvokeObjCallbacks() does this already? But why its not working then in the above code?

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 2 years ago in reply to FranzD

    Hi Franz,

    Because the setting of cdfgForm (and cdfgData) is only done within the scope of the CCSinvokeObjCallbacks call. Once that returns, it is no longer set.

    I'm not sure which version of CCSinvokeObjCallbacks you're using (look at the SCCS information in the comments at the top), but the code can also call the display callbacks and return the results, using:

    CCSinvokeObjCallbacks(cdf ?callInitProc t ?callbackType 'display ?returnResults t)

    this will then return an assoc list of parameter name and result of the callback. There's a comment near the top of the file which mentions this (associated with version 1.17).

    Regards,

    Andrew

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • FranzD
    FranzD over 2 years ago in reply to Andrew Beckett

    I am using version 1.20 (last modified Nov 22).  I didnt understood the callbackType functionality. But now I do: So if I call CCSinvokeObjCallback with ?callbackType 'display and ?returnResults  t  I will get a list for each cdf parameter containing its name and the result of the display callback. I could then do the same with ?callbackType  'editable and sort out wich parameters have a t for each callback...?

    Also thanks for the reply,

    Regards,

    Franz

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 2 years ago in reply to FranzD

    Hi Franz,

    FranzD said:
    I could then do the same with ?callbackType  'editable and sort out wich parameters have a t for each callback...?

    Spot on. You got it exactly right. I added this functionality relatively recently for an internal team who needed access to the editable/display information efficient for all fields.

    Andrew

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • FranzD
    FranzD over 2 years ago in reply to Andrew Beckett

    Glad you did, its really usefull for my case. At last do you have a tip how to easly filter the parameters? Is it a good idea to use two foreach loops and check the values for both callbacks or is there an other way?

    Franz

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 2 years ago in reply to FranzD

    The comment at the top includes a setof() to filter just those which are true (that's only looking at (say) the display callback result). You could do:

    displayResult=CCSinvokeObjCallbacks(cdf ?callInitProc t ?callbackType 'display ?returnResults t)
    editableResult=CCSinvokeObjCallbacks(cdf ?callInitProc t ?callbackType 'display ?returnResults t)
    combinedResult=foreach(mapcar (disp edit) displayResult editableResult list(car(disp) cadr(disp)&&cadr(edit)))
    filtered=setof(pair combinedResult cadr(pair))
    fiteredParams=mapcar('car filtered)

    (I didn't test this, but it should be something like that to give you the parameter names which have both display and editable as non-nil)

    Andrew

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • FranzD
    FranzD over 2 years ago in reply to Andrew Beckett

    Ok I tested it and it works. Thank you very much!

    • 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