• 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. Allegro X Scripting - Skill
  3. ipcBeginProcess asynchronously execution code

Stats

  • State Suggested Answer
  • Replies 3
  • Answers 1
  • Subscribers 18
  • Views 3519
  • Members are here 0
More Content

ipcBeginProcess asynchronously execution code

rttturn
rttturn over 2 years ago

Hi,

 Cadance Allegro 17.2, Win10 x64

I am using ipcSkillProcess to communication with a .exe. I found that I need executed any line of command before the callback function is executed.

I can't get messages automatically.I want to implement exe to actively invoke skill to execute a particular program.

like the picture,

1. skill receive  "hello skill ipc,send data1&*()\\r\\r\\n"

2. I use ipcWriteProcess to send "ack1 \n"

3. .exe receive the message  "ack1 \n", send "get ack1,send data2" to skill

4. skill can't receive the message. if I executed any line of command(printf("111test")), I get the message "get ack1,send data2"

I'm upset about this problem ......

skill code:
cid = ipcBeginProcess("skill.exe" "" `ipc_callback `ipc_err `ipc_exit "skill.log")
procedure(ipc_callback(@rest ipc_callback_args)
    printf("--ipc begin receive--\n")
    printf("list length:%d\n" length(ipc_callback_args))
    printf("%s\n" car(ipc_callback_args))
    printf(nth(1 ipc_callback_args))        
    printf("--ipc receive end--\n")
)
.exe(python) code:
import sys
sys.stdout.write("hello skill ipc,send data1&*()\n")
sys.stdout.flush()
c = sys.stdin.readline()
if c == 'ack1 \n':
sys.stdout.write('get ack1,send data2')
sys.stdout.flush()
shell result:

 

 Thank you,

rtttune

  • Cancel
  • Sign in to reply
  • mahimag
    0 mahimag over 2 years ago

    Hello rttturn As I understand, you are trying to use IPC between SKILL and Python. In your code I see, by using IpcBeginProcess in skill you are calling SKILL executable, can you share some more details about the requirement here?

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • rttturn
    0 rttturn over 2 years ago in reply to mahimag

    I made an example to repeat the problem:

    --SKILL code:

    axlCmdRegister("test" 'test111)

    procedure( dataH(cid data)
    printf("cid: %L Msg: %s\n" cid data)
    ipcWriteProcess( cid "ack1 \n" )
    )

    procedure( simErr(cid err)
    printf("Error %L Msg: %s\n" cid err)
    ipcKillProcess(cid)
    )

    procedure( simTerm(cid exit)
    printf("Simulator expired with exit status = %L %d\n" cid exit)
    )

    procedure( test111()
    cid = ipcBeginProcess("D:\\skill Shell\\PY\\dist\\skill1.exe" "" "dataH" "simErr" "simTerm" "")
    )
    --PY code(Compiled to skill1.exe using pyinstaller):
    import sys
    sys.stdout.write("hello skill ipc,send data1&*()\n")
    sys.stdout.flush()
    c = sys.stdin.readline()
    if c == 'ack1 \n':
    sys.stdout.write('get ack1,send data2')
    sys.stdout.flush()
    --allegro shell export:(only can receive message before execute the code "x=1" in shell)
    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • Kirti Sikri
    0 Kirti Sikri over 2 years ago in reply to rttturn

    Hello Eugene,

    Thanks for sending the code

    I have got following message on the Allegro Command window modying the code you shared.

    Code (skill and python are given below) 

    Does it meet your requirements

    test.py:

    import sys

    sys.stdout.write("ABC hello skill ipc,send data1&*()\n")
    sys.stdout.flush()

    c = sys.stdin.readline()

    if c == 'ack1 \n':
    sys.stdout.write('get ack1,send data2')
    sys.stdout.flush()

    test.il:

    Call program test.py from ipcBeginProcess with full path.

    axlCmdRegister("test" 'test111)

    procedure( dataH(cid data)
    printf("cid: %L Msg: %s\n" cid data)
    ipcWriteProcess( cid "ack1 \n" )
    )

    procedure( simErr(cid err)
    printf("Error %L Msg: %s\n" cid err)
    ipcKillProcess(cid)
    )

    procedure( simTerm(cid exit)
    printf("Simulator expired with exit status = %L %d\n" cid exit)
    (drain (inSkill stdout))
    )

    procedure( test111()
    cid = ipcBeginProcess("C:/Python/python test.py" "" 'dataH 'simErr 'simTerm)
    )

    Thanks,

    Kirti

    • Cancel
    • Vote Up +2 Vote Down
    • Sign in to reply
    • Verify Answer
    • Reject Answer
    • Cancel
Cadence Guidelines

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