• 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. (getCallingFunction) in SKILL++

Stats

  • Locked Locked
  • Replies 2
  • Subscribers 142
  • Views 13489
  • 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

(getCallingFunction) in SKILL++

AurelBuche
AurelBuche over 6 years ago

Hi,

I would like to define enhanced info, warn, error functions so the name of the calling function is printed at the beginning of the message:

Here is what I've done for info: (same with warn and error)

(defun infox (message @rest args "tg")
  (apply 'info (cons (strcat (or (getCallingFunction) "") ": " message "\n") args)))

It works perfectly fine in SKILL but it does not in SKILL++:

\i toplevel 'il
\p >
\i (defun helloWorld nil (infox "my message"))
\o function helloWorld redefined
\t helloWorld
\p >
\i (helloWorld)
\o helloWorld: my message
\t nil
\p >
\i (defun helloWorld nil (let nil (infox "my message")))
\o function helloWorld redefined
\t helloWorld
\p >
\i (helloWorld)
\o helloWorld: my message
\t nil
\p >
\i toplevel 'ils
\p ILS->
\i (defun helloWorld nil (infox "my message"))
\w *WARNING* (define): redefining SKILL function helloWorld to be Scheme variable
\t helloWorld
\p ILS->
\i (helloWorld)
\o helloWorld: my message
\t nil
\p ILS->
\i (defun helloWorld nil (let nil (infox "my message")))
\o variable helloWorld redefined
\t helloWorld
\p ILS->
\i (helloWorld)
\o : my message
\t nil
\p ILS->

It seems that the environment defined by the let in SKILL++ is blocking access to the call stack but I do not get why

Any proper solution or workaround would be very welcome as I don't think typing the name of the calling function in every message I write is the best solution

Thanks

  • Cancel
  • mbracht
    mbracht over 6 years ago

    Hi,

    This behaviour is not reproducible for me - I'am always getting name of the calling function.
    Other that that - why do you redefine the functions in SKILL++ - since plain SKILL and SKILL++ share functions that shouldn't be necessary.

    Max

    • Cancel
    • Vote Up +1 Vote Down
    • Cancel
  • AurelBuche
    AurelBuche over 6 years ago in reply to mbracht

    Ok thanks,

    I don't know exactly where I am corrupting my call stack because in a clean setup I don't have this issue but when I autoload my SKILL files it still happen

    It works fine in IC 6.1.8 though

    About the functions definition I know SKILL and SKILL++ can both share their functions but they are not defined the same way so I tried both possibilities to be sure it was not due to that

    • 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