• 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. Ignoring patterns in CDF callbacks (CCSinvokeCallbacks)

Stats

  • Locked Locked
  • Replies 5
  • Subscribers 143
  • Views 4772
  • 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

Ignoring patterns in CDF callbacks (CCSinvokeCallbacks)

AB_1716362704952
AB_1716362704952 over 1 year ago

Hello,

I am writing some code in SKILL (Actually in Python, but translated from SKILL to Python using some neat toolboxes), in which I run simulations in a loop with different parameters using OCEAN. In my testbench which currently only has one inductor from my PDK, the properties also include information about the area, self-resonance frequency, Q-value, etc, of the inductor, when I change its physical parameters. Since these parameters are calculated when the values are changed inside the property form, they must be updated using a CDF callback as explained here: https://support.cadence.com/apex/ArticleAttachmentPortal?id=a1Od0000000namyEAA&pageName=ArticleContent

However, the problem that I am finding is that when I call this CDF callback, it also calls some commands which I do not want it to call. The main two being a plot function "schCDFCallback('Plot)" and an "About" function which just opens an infobox "schCDFCallback('about)". Why specifically is that these two seem to freeze my code until I close said windows, hence in my code where I attempt to run simulations in a loop, this creates a problem.

Through digging into the code given in the link above, I was able to find the CCScallbackPatternsToIgnore function inside, but most likely due to my SKILL knowledge still being rather basic, and/or just me not understanding what it wants from me, I have been unable to find a way for it to ignore the two patterns relating to the "About" window and the "Plot" window.


(unless (boundp 'CCScallbackPatternsToIgnore)
  (setq CCScallbackPatternsToIgnore
        ("^MYPDKNOT_Allowed.*")))

The code snippet that I am referencing. Here is where I have attempted to include the callback functions relating to 'Plot and 'about, but without any success so far. Any help on this would be greatly appreciated.

Thanks in advance

  • Cancel
  • Andrew Beckett
    Andrew Beckett over 1 year ago

    The CCScallbackPatternsToIgnore is quite simple, and so has to be POSIX-style regular expressions (rather than perl-compatible regular expressions) because the code also was designed to work with IC5141. However, you can have a list of expressions - so you can just set this (in C-like syntax - I tend to write code in LISP syntax much of the time, but it's probably a bit more accessible this way):

    CCScallbackPatternsToIgnore=list("^schCDFCallback('Plot)" "^schCDFCallback('about)")

    However, I don't think these are the right callback names. This is the function that is used in the Virtuoso Schematic Editor as the function called from the edit properties form (say) but handles interfacing with the CDF callback. You should check in the CDF for the component in question, and look for the Plot and about parameters, and see what the callback defined in the CDF (via Tools→CDF→Edit in the CIW). Those are the functions you should block, because it's these that the CCSinvokeCdfCallbacks will use - not the wrapper schCDFCallback.

    Andrew

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • AB_1716362704952
    AB_1716362704952 over 1 year ago in reply to Andrew Beckett

    Thanks Andrew, following your advice I was able to find the actual callback statements from the CDF editor. Unfortunately I still have not been able to get the expected behavior out of the CCScallbackPatternsToIgnore command line inside the script. I tried to follow the example given in the already existing expression "^MYPDKNOT_Allowed.*"

    (unless (boundp 'CCScallbackPatternsToIgnore)
      (setq CCScallbackPatternsToIgnore
            ("^PLOT_CALLBACK().*" "^info().*")))

    As a result of your advice and my trials with this expression, the infobox and the plot have stopped showing up.I'm very hesitant to call it a victory, as it seems like even if I comment or delete the ignore callbacks function, I am unable to get the windows to open up again. I would expect that the previous behavior would return once I undo my changes, but alas it didn't and that has me a little confused. The CIW output looks like this when I first load the changed file and then run it with my cellview, in case if it is of any help:

    load("./CCSinvokeCdfCallbacks.il")function CCSshouldCallbackBeExecuted redefined

    function CCSgetLibCellFromCDF redefined

    function CCScreateEffectiveCDFLookalike redefined

    function CCSaddFormFieldsToEffectiveCDFLookalike redefined

    function CCSinvokeObjCdfCallbacks redefined

    function CCSinvokeInstCdfCallbacks redefined

    *WARNING* defstruct: Redefining Structure CCScellCdfCache.

    function make_CCScellCdfCache redefined

    function copy_CCScellCdfCache redefined

    function CCSgetCdfForCell redefined

    function CCSgetCachedCdfgForm redefined

    function CCSrestoreCellCdf redefined

    function CCSconvertCdfToPcellParams redefined

    function CCSinvokeCdfCallbacks redefined

    t

    CCSinvokeCdfCallbacks(cv)

    *WARNING* Can't modify attributes of effective CDF data.

    I did not make any changes inside the CDF editor, so I am a little puzzled where it could be trying to modify the attributes of the CDF data.

    Thanks again for your previous answer, as it has allowed me to progress with this issue.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 1 year ago in reply to AB_1716362704952

    I wouldn't change the default line in the code - instead just (somewhere) set the variable as I suggested in the previous post. If you do it the way that you're doing it, it won't have a difference any time the code is loaded beyond the first time, because there's a check to see if the variable is set before setting it to the default.

    Which version of CCSinvokeCdfCallbacks are you using? There's a version number at the top in the comments with a "SCCS" line. In the latest it is not using the effective CDF by default, so I would be slightly surprised by the warning message at the bottom of your last post.

    Andrew

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • AB_1716362704952
    AB_1716362704952 over 1 year ago in reply to Andrew Beckett

    Hi Andew,

    Thanks so much for your help, Adding everything in their own variable outside of the default function simplifies things a lot and seems to be working. The reason why I was getting that warning was because of another CDF callback which was trying to re-calculate some parameters inside the device, but it was failing to do so because it was trying to use text variables I had set to do so.

    I now figured out also why I was getting the odd behavior where even commenting out the CDF callback ignore list was still not giving me back the original behavior where the info and plot functions were not showing up. It seems like at least in my case that when I set the callback ignore list to some variable (the functions to ignore), then comment it out and load it again, the original list still remains in the memory until I explicitly set it to an empty list and then load it. That way I am able to guarantee that the list is actually empty, and the behavior is as I expect.

    Everything works now, but since you asked the SCCS version number is stated as "SCCS Info: @(#) CCSinvokeCdfCallbacks.il 11/01/22.10:52:57 1.20" In the code I am running.

    Thanks again, this has been valuable for my learning.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 1 year ago in reply to AB_1716362704952

    Thanks for the update!

    AB_1716362704952 said:
    Everything works now, but since you asked the SCCS version number is stated as "SCCS Info: @(#) CCSinvokeCdfCallbacks.il 11/01/22.10:52:57 1.20" In the code I am running.

    Yes, that's the latest version.

    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