• 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. Calling external binary files without freezing Virtuoso

Stats

  • Locked Locked
  • Replies 5
  • Subscribers 143
  • Views 9600
  • 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

Calling external binary files without freezing Virtuoso

DeyanLevski
DeyanLevski over 3 years ago

Good day everyone,

I am trying to call calibre from within Virtuoso using the following procedures:

           runCalDRC = strcat("calibre -drc -cb " drcRunDir "/drc_rules.rul &")

           procedure(calibreFinished(ipcId status)
           printf("Calibre run finished\n")
           )

           procedure(calibreOutput(ipcId data)
           printf("Calibre output: %L\n" data)
           )

           procedure(calibreRunDRC(runCalDRC)
            let((ipcId)
                ipcId=ipcBeginProcess(runCalDRC "" 'calibreOutput 'calibreOutput 'calibreFinished)
                )
           )

However calling Calibre using the above way freezes Virtuoso and makes it unsuitable to work on while Calibre is running. I read that one needs to use asynchronous process handling using the ipcBatchProcess() functions, however the following also freezes Virtuoso on my side. I also tried calling Calibre using csh() and system() but both still lead to Virtuoso freezing until the Calibre process was stopped. Perhaps I am calling the Calibre process not in an asynchronous way.

Could anyone give a hint on how one can correctly call an external binary in parallel with running virtuoso? And not freezing the virtuoso process of course.

Kind Regards,
Deyan

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

    That should not cause Virtuoso to freeze. Are you callling ipcWait elsewhere in the code? (That would cause Virtuoso to wait for the process to finish). Note that the ampersand in the command is unnecessary 

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

    That should not cause Virtuoso to freeze. Are you callling ipcWait elsewhere in the code? (That would cause Virtuoso to wait for the process to finish). Note that the ampersand in the command is unnecessary 

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Children
  • DeyanLevski
    DeyanLevski over 3 years ago in reply to Andrew Beckett

    Strangely ipcWait is nowhere to be found in my code.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • DeyanLevski
    DeyanLevski over 3 years ago in reply to DeyanLevski

    Perhaps another strange behaviour I observe is that the Calibre output log does not show in the CIW window until the Calibre process ends.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 3 years ago in reply to DeyanLevski

    I can't see any reason why this would hang. I have tried the code running something which produces output and then sleeps - and that doesn't hang Virtuoso. 

    The reason why the output doesn't appear until the end may be because the output is buffered and the buffer doesn't fill up until later; either way though I can''t see why it would block - the IPC functions used in this way should be completely non-blocking. Perhaps you should contact customer support.

    Andrew

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • DeyanLevski
    DeyanLevski over 3 years ago in reply to Andrew Beckett

    Hi Andrew,

    Thanks for your help. I managed to solve the issues I was having and I can confirm for everyone else - the procedures above do work as expected and do not hang Virtuoso.

    The reason I had issues with hanging was quite simple and heavily overlooked from my side - I have quite convoluted procedures where one calls another, which then decides to call calibre with different options. In one of the main wrapper functions I was calling calibre using csh() which slipped away my checks and this was causing virtuoso hang as expected.

    Thanks a lot for your prompt help.

    Deyan

    • 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