• 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. Problem of find files with ipc command

Stats

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

Problem of find files with ipc command

Martinsh
Martinsh over 1 year ago

Skill code to find and print the files with name that matches *.cdslck* in the current directory:

findCmd = "find . -name '*.cdslck*' -print"
cid1 = ipcBeginProcess(findCmd)
;ipcWaitForProcess(cid1)
ipcWait(cid1)
strOut = ipcReadProcess(cid1)
println(strOut)

After ipcBeginProcess() command, if ipcWaitForProcess(cid1) command is used, nothing is read out, strOut="".

If ipcWait(cid1) is used, the read out string is correct. But if too many files are found, the string read out is not completed. In my case, the files after the 74 are discarded.

Question1, what's the difference between functions ipcWait() and ipcWaitForProcess()? I can't find it from the skill manual.

Question2, Why the read out string is not complete with ipcReadProcess() after ipcWait() when the output string is long enough? How to solve this problem?

Best Regards,

Martin

  • Cancel
Parents
  • Andrew Beckett
    Andrew Beckett over 1 year ago

    Martin,

    First of all, I'd suggest using "clsAdminTool -ale ." instead of just using a find - it gives a bit more information.

    • ipcWaitForProcess() waits for a process to start up and be ready to communicate - in other words, it's been launched by the IPC infrastructure.
    • ipcWait() waits for it to complete.

    ipcReadProcess() doesn't guarantee to read the entire output in one go. You might need multiple ipcReadProcess() calls. From the documentation:

    Reads data from the child process stdout channel, allowing the
    developer to specify a time, in seconds, beyond which the read
    operation must not block. It only reads 4096 bytes for each call.

    You might (therefore) need a loop to read the data:

    ipcWait(cid1)
    while(strOut=ipcReadProcess(cid1)
      println(strOut)
    )

    should do it. Note that if you use ipcReadProcess() 

    Andrew

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Reply
  • Andrew Beckett
    Andrew Beckett over 1 year ago

    Martin,

    First of all, I'd suggest using "clsAdminTool -ale ." instead of just using a find - it gives a bit more information.

    • ipcWaitForProcess() waits for a process to start up and be ready to communicate - in other words, it's been launched by the IPC infrastructure.
    • ipcWait() waits for it to complete.

    ipcReadProcess() doesn't guarantee to read the entire output in one go. You might need multiple ipcReadProcess() calls. From the documentation:

    Reads data from the child process stdout channel, allowing the
    developer to specify a time, in seconds, beyond which the read
    operation must not block. It only reads 4096 bytes for each call.

    You might (therefore) need a loop to read the data:

    ipcWait(cid1)
    while(strOut=ipcReadProcess(cid1)
      println(strOut)
    )

    should do it. Note that if you use ipcReadProcess() 

    Andrew

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Children
  • Martinsh
    Martinsh over 1 year ago in reply to Andrew Beckett

    Thanks Andrew. It works!

    Martin

    • 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