• 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. ddRegTrigger: trigger a function when a cell is opened for...

Stats

  • Locked Locked
  • Replies 4
  • Subscribers 143
  • Views 14849
  • 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

ddRegTrigger: trigger a function when a cell is opened for edit

caver456
caver456 over 6 years ago

We'd like to register a trigger function to be called whenever a cell is requested to be opened for edit.  (or, a function called whenever a cell is accessed, which can determine whether the requested mode is edit/append)

For starters, we have this:

procedure(preObjAccessTrigger(a b c d e f)
  printf("preObjAccessTrigger called: %L %L %L %L %L %L\n" a b c d e f)
  t
)

ddRegTrigger("PreObjAccess" 'preObjAccessTrigger)

But the last argument (mode) is always "r" regardless of whether the cell is being opened for edit or for read, or being changed from edit to read or vice versa after it is already opened.

What we are trying to accomplish is to give a warning and prompt for confirmation before edit is allowed on cells from certain libraries.  Changing the linux permissions of the entire libraries in question is a much less desirable option.

What can be done to tell what file mode is being requested before the cell is actually opened in that mode?

I've also tried PreAutoCheckout:

procedure(preAutoCheckoutTrigger(a b)
  printf("preAutoCheckoutTrigger called: %L %L\n" a b)
  t
)

ddRegTrigger("PreAutoCheckout" 'preAutoCheckoutTrigger)

which does indeed get called (even though we are not using any Data Management) - but it errors out with an odd error every time - here's the CIW transcript immediately after trying to open a cell for edit:

\i ddsServOpen("v8685" "channel_i3712" "layout" "edit" nil)
\o preObjAccessTrigger called: "v8685" "channel_i3712" "layout" "*" nil "r"
\o preObjAccessTrigger called: "v8685" nil nil nil nil "r"
\o preObjAccessTrigger called: "v8685" "channel_i3712" "layout" "layout.oa" nil "r"
\o preObjAccessTrigger called: "v8685" "channel_i3712" "layout" "*" nil "r"
\o preObjAccessTrigger called: "v8685" "channel_i3712" "layout" nil nil "r"
\o preObjAccessTrigger called: "v8685" "channel_i3712" "layout" "layout.oa" nil "r"
\o preObjAccessTrigger called: nil nil nil "*" dd:0x2c4ad500 "r"
\o preAutoCheckoutTrigger called: (dd:0x2c4ad500) nil
\e *Error* car: Can't take car of atom - t
\w *WARNING* (DEBASE-102079): A SKILL error occurred in function _leDataTrigger
\a _hiSetCurrentWinNum(2)
\w *WARNING* (DEBASE-102084): Data trigger for viewType maskLayout failed.
\r t

  • Cancel
  • caver456
    caver456 over 6 years ago

    by the way this is 6.1.7-64b.500.18

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 6 years ago in reply to caver456

    You might want to take a look at this post (from 5 years ago, but it includes some code I wrote back in 1998!)       Re: LibManager Edit Trigger/Callback     

    I think the PreAutoCheckout trigger is the right one to use, but it needs to return a list of t and nil for each object - see the example in the ACL.il code in the post I link to above to see how I do this. That ACL.il code was to implement an "access control list" mechanism for a library, so it's somewhat similar to your intention, I think.

    Regards,

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • caver456
    caver456 over 6 years ago in reply to Andrew Beckett

    thanks, this is a great lead.  Working on putting it to use now...

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • caver456
    caver456 over 6 years ago in reply to caver456

    Ok, that led directly to a working solution.  Thanks for the help!

    • 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