• 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. SKILL - determine when asynchronous task complete

Stats

  • Locked Locked
  • Replies 3
  • Subscribers 143
  • Views 2803
  • 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

SKILL - determine when asynchronous task complete

Nellis
Nellis over 12 years ago

I am new to SKILL, so this may be an easy question for someone to answer:

I am working on a custom SKILL interface that is made up of a Tree Table.  In order to generate the report, I have to expand all of the items in the tree.  When I expand the tree items, there is a callback that generates an asynchronous method to get information from a command line script that updates information in the tree, and then updates the GUI with the information through another callback.  This asynchronous update is performed for each item in the tree.  For large trees, this expanding and updating could take 10-20 minutes.

In order to generate my report, I need to expand all of the items in the tree, and then wait for the asynchronous update to complete before I can generate my report to export.

I see that I have 3 options:

1.  Figure out a way to execute a callback function when all of the updates are done (is this possible?)
2.  for the report output, implement a synchronous update as each item is expanded, and wait for each item to be updated, and when the last update is updated generate the report
3.  Poll the asynchronous process, or the data, with an hiSleep() , until the last process is complete, all the fields for each Tree item is populated, or a global variable that would track each item's status, and then run the report

I have implemented #3, and it works, but it does not seem to be the most appropriate solution, so I am looking for suggestions.

Thanks,

- Nellis

  • Cancel
Parents
  • dmay
    dmay over 12 years ago

    Not only can you check to see if ipc processes are still alive and running (ipcIsAliveProcess), but you can also communicate back to Cadence from the script started by ipcBeginProcess. Each process could tell your Cadence session when it is done. Thus, your tree should be ready once all sub-processes have communicated back to the Cadence session that they have completed.

    ipcId = ipcBeginProcess(cmd "" 'myIpcDataHandler 'myIpcErrHandler 'myIpcFinishHandler "/tmp/ipc.log")

    procedure(myIpcDataHandler(ipcId data)
      let((result)
        printf("in myIpcDataHandler with %L\n" data)
        ;If the script creates Skill code, the following would run it in your Cadence session
        foreach(d parseString(data "\n")
            unless(errset(result=evalstring(d))
             printf("%L" errset.errset)
            ) ; unless
        )
      )
    )

    NOTE: I edited the original post of this message since the Skill syntax was incorrect. There was a missing printf in the middle of the unless section.


    Derek

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Reply
  • dmay
    dmay over 12 years ago

    Not only can you check to see if ipc processes are still alive and running (ipcIsAliveProcess), but you can also communicate back to Cadence from the script started by ipcBeginProcess. Each process could tell your Cadence session when it is done. Thus, your tree should be ready once all sub-processes have communicated back to the Cadence session that they have completed.

    ipcId = ipcBeginProcess(cmd "" 'myIpcDataHandler 'myIpcErrHandler 'myIpcFinishHandler "/tmp/ipc.log")

    procedure(myIpcDataHandler(ipcId data)
      let((result)
        printf("in myIpcDataHandler with %L\n" data)
        ;If the script creates Skill code, the following would run it in your Cadence session
        foreach(d parseString(data "\n")
            unless(errset(result=evalstring(d))
             printf("%L" errset.errset)
            ) ; unless
        )
      )
    )

    NOTE: I edited the original post of this message since the Skill syntax was incorrect. There was a missing printf in the middle of the unless section.


    Derek

    • 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