• 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. ddsSyncWithForm does not sync lib/cell/view to GUI when...

Stats

  • Locked Locked
  • Replies 2
  • Subscribers 143
  • Views 1489
  • 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

ddsSyncWithForm does not sync lib/cell/view to GUI when executing via IPC channel

lcheng
lcheng over 4 years ago

Hi,

I have a function to pop up a GUI for user to select the lib, cell and view.

In the GUI there is a 'Browse' button that will run 'ddsSyncWithForm' and pop up the Library Browser for user to select.

I expect that when the user select something on Library Browser, 'ddsSyncWithForm' will sync the selection back to my GUI.

But it seems if the command to pop up the GUI dialog comes from the IPC channel, the sync behavior does not work.

The SKILL codes I tested is as following:

My_browse() is the function to pop up my customized GUI with 'Browse' button. It works when calling from Virtuoso CIW directly.

My_browse_from_ipc() is the function to invoke an external process 'test_ipc.sh'. The 'test_ipc.sh' will send (My_browse) back to Virtuoso via IPC channel. In this situation the sync behavior does not work.

;;; test.il start

procedure(My_browse()
prog((promptFd libNameFd cellNameFd viewNameFd browseButtonFd dlg)
    promptFd = hiCreateLabel(
        ?name 'promptFd
        ?labelText "Open layout cell INV_0"
    )
    libNameFd = hiCreateStringField(
        ?prompt "Library Name:"
        ?name 'libNameFd
        ?editable t
    )
    cellNameFd = hiCreateStringField(
        ?prompt "Cell Name:"
        ?name 'cellNameFd
        ?defValue "INV_0"
        ?editable t
    )
    viewNameFd = hiCreateStringField(
        ?prompt "View Name:"
        ?name 'viewNameFd
        ?defValue "layout"
        ?editable t
    )
    browseButtonFd = hiCreateButtonBoxField(
        ?name 'browseButtonFd
        ?prompt " "
        ?choices '(" Browse ")
        ?callback list("ddsSyncWithForm(hiGetCurrentForm() 'browse 'libNameFd 'cellNameFd 'viewNameFd)")
    )

    dlg = hiCreateAppForm(
        ?name 'My_dlg
        ?formTitle sprintf(nil "Specify %s cell" "layout")
        ?fields list(promptFd libNameFd cellNameFd viewNameFd browseButtonFd)
        ?callback "My_cb(hiGetCurrentForm())"
        ?unmapAfterCB t
        ?dialogStyle 'modal
        ?buttonLayout 'OKCancel
    )
    hiDisplayForm(dlg)
))

procedure(My_cb(theForm)
    hiSetCallbackStatus(theForm t)
    ddsEndSyncWithForm()
    t
)

My_test_pid = nil
procedure(My_test_input_handler(pid data)
    printf("(pid: %d) - '%s'" pid data)
)
procedure(My_test_error_handler(pid data)
    printf("(pid: %d) - '%s'" pid data)
)
procedure(My_test_stop_handler(pid status)
    printf("(pid: %d) - stopped" pid)
)
procedure(My_browse_from_ipc()
    My_test_pid = ipcSkillProcess(
        "./test_ipc.sh"
        ""
        "My_test_input_handler"
        "My_test_error_handler"
        "My_test_stop_handler"
        ""
        4
        5
    )
    ipcWaitForProcess(My_test_pid)
)

;;; test.il end

## test_ipc.sh start

#!/bin/bash

echo '(My_browse)' >&4

sleep 20

exit 0

## test_ipc.sh end

Does anyone try this before?

If so could you help to point me if anything is wrong.

Thanks,

Wei

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

    Hi Wei,

    This is a quirk due to (I think) interactions with the event loop - essentially the issue is that the SKILL function launched by the IPC process doesn't return, and this causes it not to be able to handle the updates to the form. I've not looked into the precise details of why this is happening, but it's easily worked around by adding ?dontBlock t to the hiCreateAppForm call. The UI itself still blocks (because it's modal), but the hiDisplayForm returns immediately, which allows the call to My_browse to return too.

    Regards,

    Andrew

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

    Hi Wei,

    This is a quirk due to (I think) interactions with the event loop - essentially the issue is that the SKILL function launched by the IPC process doesn't return, and this causes it not to be able to handle the updates to the form. I've not looked into the precise details of why this is happening, but it's easily worked around by adding ?dontBlock t to the hiCreateAppForm call. The UI itself still blocks (because it's modal), but the hiDisplayForm returns immediately, which allows the call to My_browse to return too.

    Regards,

    Andrew

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Children
  • lcheng
    lcheng over 4 years ago in reply to Andrew Beckett

    Hi Andrew,

    Thanks a lot for your information. The solution of "?donBlock t" work well on IPC process!

    Regards,

    Wei

    • 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