• 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. Add an item ADE-XL results tab (when right clicking on a...

Stats

  • Locked Locked
  • Replies 12
  • Subscribers 143
  • Views 20694
  • 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

Add an item ADE-XL results tab (when right clicking on a test result)

PatrikOsgnach
PatrikOsgnach over 8 years ago

Hello,

I have this scenario: in ADE-XL, after I load an old result to active, if I select the results tab and right click on a result, I have a nice menu with many options.

I would like to add an item to this menu. From what I read on this forum, I added this code to menus/spectre.menus


(sevAddMenuItemLists                                                                                          
    (lambda (session name)
        (case name
              ("&Results" list( (list "TestItem" ?disable nil ?form t ?callback "(testfunc session)") ) )
        );case
    ) ; lambda
) ; sevAddMenuItemLists
(procedure (testfunc s) (println (sprintf nil "Simdir is %s" s->axlCurrentDataDir)) )

but, when I right click, I get this message in CIW:

ERROR (ADEXL-2822): Invalid menu list structure "(false false)" provided.
Menu items must be specified as a list of ("menu name" "callback" {"true", "false"}), where the last argument specifies whether the item is disabled.
For submenus, replace the callback string with a sublist of menu items.

and nothing gets printed

What is the correct way to achieve this? I need to be able to access the "session" variable inside my callback

Best regards,

Patrik

  • Cancel
Parents
  • Andrew Beckett
    Andrew Beckett over 8 years ago

    Patrick,

    Given that everything in SKILL is a function (all operators are functions masquerading as operators), I don't think it's too onerous to do:

    x=(CCFcurry adder 3)
    y=(CCFcurry adder)

    (actually the second of these could just be done with x=adder). Then you can do (x 4) or (y 5 6)

    You could also write a different currying function like this (as a macro) so that you can specify the argument in a more conventional function call syntax:

    (defmacro CCFbalti (expr "l")
      `(lambda (@rest args) (apply ,(car expr) (append ',(cdr expr) args)))
    )

    Then you could do:

    x=CCFbalti(adder(3))
    y=CCFbalti(adder())
    z=CCFbalti(1+2+3) ; this is really doing (plus 1 2 3), so that's what it is currying

    x(4) => 7
    y(1 2) => 3
    z(4) => 10

    Apologies to Haskell Curry for the dreadful pun on his name for this second function...

    For the second part, you probably just want asiGetPsfDir(session). You shouldn't really be trying to access the individual result database filename - because the name of that is dependent upon which analyses you've run and which output format you've chosen (and to some extent, which version of the simulator you're using). Why do you need to do that? You can use openResults(...) to open a PSF results directory, and then access all the analysis data within.

    Regards,

    Andrew.

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

    Patrick,

    Given that everything in SKILL is a function (all operators are functions masquerading as operators), I don't think it's too onerous to do:

    x=(CCFcurry adder 3)
    y=(CCFcurry adder)

    (actually the second of these could just be done with x=adder). Then you can do (x 4) or (y 5 6)

    You could also write a different currying function like this (as a macro) so that you can specify the argument in a more conventional function call syntax:

    (defmacro CCFbalti (expr "l")
      `(lambda (@rest args) (apply ,(car expr) (append ',(cdr expr) args)))
    )

    Then you could do:

    x=CCFbalti(adder(3))
    y=CCFbalti(adder())
    z=CCFbalti(1+2+3) ; this is really doing (plus 1 2 3), so that's what it is currying

    x(4) => 7
    y(1 2) => 3
    z(4) => 10

    Apologies to Haskell Curry for the dreadful pun on his name for this second function...

    For the second part, you probably just want asiGetPsfDir(session). You shouldn't really be trying to access the individual result database filename - because the name of that is dependent upon which analyses you've run and which output format you've chosen (and to some extent, which version of the simulator you're using). Why do you need to do that? You can use openResults(...) to open a PSF results directory, and then access all the analysis data within.

    Regards,

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Children
No Data

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