• 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. Running 2 procedures or function in 1 bindkey

Stats

  • Locked Locked
  • Replies 7
  • Subscribers 144
  • Views 14984
  • 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

Running 2 procedures or function in 1 bindkey

GDCRA
GDCRA over 8 years ago

Hi,

I was spying on skill command in CIW when I am doing some graphical actions such as clicking netlistcreat form and clicking "Apply" in order to create netlist.

I thought I will able to create keybinding to run this step, so I was trying

hiSetBindKey("Schematics" "<Key>F12" "xcreateNetlist() _hiFormApplyCB(xcreateNetlistForm)")

But its on working. For some reason, it get stucked at 1st stage of opening form. When I close this form, it perform 2nd part of nestling. So its waiting for something between step 1 and step 2.

Can someone help here ?

Thanks

  • Cancel
  • RK56
    RK56 over 8 years ago

    Hi,

    I preference for such cases would be to use hiReplayFile(). There is also hiEnqueueCmd() which I'm not familiar with much

    -Ramakrishnan

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • skillUser
    skillUser over 8 years ago
    Hi,

    Most likely the form is blocking, so as soon as it is displayed the code afterwards (applying the form callback) doesn't get executed. I think that Ramakrishnan may be correct in that you can use hiEnqueueCmd():

    hiSetBindKey("Schematics" "<Key>F12" "hiEnqueueCmd(\"_hiFormApplyCB(xcreateNetlistForm)\") xcreateNetlist()")

    However, it is often better to look for an API that is not dependent on the form/GUI - can you investigate what the form callback is and see if you can call that directly? [You may not be able to do this if the callback depends on the form structure and the values collected there].

    Best regards,

    Lawrence.
    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • GDCRA
    GDCRA over 8 years ago

    Thank you much Lawrence. Solution you provided is working. 

    On side note, how do I find out form callback ? I may need this for my other work.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • fatcat1206
    fatcat1206 over 8 years ago
    Hi Gunavant

    You may use the following trick to get the callback in a form.

    1. Call out the form.
    2. use command "form1 = hiGetCurrentForm()", to fetch the object for the form.
    3. check the property of the form, simply by "~>" operator, like "form1~>?"
    4. "_doneAction" indicates the callback function for "Apply" or "OK", like "form1~>_doneAction"
    5. if you visited a "field" of the form, you will see the "_callback" property of it, like "form1~>field1~>_callback"

    Best Regards

    Yi
    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • skillUser
    skillUser over 8 years ago

    Hi,

    This is good but I have one small correction: the ~> operator should be used with database objects such as cellview id's, object id's, tech file id's, rod objects and so on, whereas the -> operator should be used with things like menu structures, form structures, window id's, disembodied property lists, tables and so on (essentially "anything else"). One benefit of the ~> operator is that it can accept a list of objects on its left-hand-side and can apply the same query to each of those objects in turn, collecting the results of each into the resultant list.  So in your example the ~> should ideally be changed to -> (it will still work).  I reserve the use of "~>" when dealing with db objects as noted earlier.

    Cheers,

    Lawrence.

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

    Hi Lawrence,

    <pedantryAlert>

    Whilst I tend to follow the convention you suggest (although generally speaking I write in LISP syntax rather than using operators at all, as you know), strictly speaking the only difference between ~> and -> is when the left-hand-side is a list.

    If the left-hand-side is a singleton object, they are equivalent. If the left-hand-side is a list, then -> treats the list as a disembodied property list; the ~> operator does an implicit "foreach mapcar" across the list - so in other words if you do theList~>prop it will return a list of all the resulting values that you'd get if you did ~>prop for each member of the list.

    </pedantryAlert>

    Regards,

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • fatcat1206
    fatcat1206 over 8 years ago

    Hi Andrew and Laurence

    Thank you for giving the insight of "~>" and "->". It's very helpful.

    I use "~>" more often, as when I read the "User Guide", it mentioned "~>" as generalization of "->".

    And during practice, I found "~>" is easier to use (works at most of the situations)

    I just try both of them on a disembodied proper list, and recall my memory that I use "->" for the DPL in the past, as "~>" fails.

    And with your explanation, I have a further understanding of the error message and why "~>" fails. Thanks again.

    Best Regards

    Yi

    • 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