• 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. ipcBeginProcess() and system() yield different results

Stats

  • Locked Locked
  • Replies 4
  • Subscribers 143
  • Views 11175
  • 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

ipcBeginProcess() and system() yield different results

Kevin Buck
Kevin Buck over 3 years ago

I'm running the following bit of SKILL:

grepDRC = ipcBeginProcess("[my regular expression]")

ipcWait(grepDRC)

resultStringDRC=ipcReadProcess(grepDRC)

This returns "\n" when I query resultsStringDRC. However when I run the following command:

system("[my regular expression]")

I get a different result (actually the expected one). If I run the same command from the terminal I get the same output as the system command. Anyone know what's going on here?

I'm using Cadence version IC6.1.8-64b.500.9

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

    Not without you showing what the "[my regular expression]' actually is. I'm sure it's not literally that (because that would give an error).

    Given that system() doesn't return any output - it just returns the status - any output appears in the terminal, whereas ipcBeginProcess allows you to retrieve the standard output, so they are clearly different anyway, but it's unclear to me what the problem is you're describing...

    Andrew

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

    Sorry I realize that I didn't explain that well enough. I was just using system because I was not getting the expected result and I was trying to troubleshoot. When I enter a simple regular expression for ipcBeginProcess it seems to work. The regular expression I'm having an issue with is:

    "rg 'Run Result\s+:\s+(\w+)' -Nor '$1' ./folder/subfolder/filename.rep.cls"

    The tool complained about the backslashes not being followed by valid characters so I also tried escaping them with an additional backslash. This is when I get \n returned otherwise it returns nil.

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

    Hi Kevin,

    In general backslashes in SKILL need to be escaped as they are special to SKILL. I didn't have "rg" installed, so I located it and downloaded it to try it out. Other than the backslashes needing escaping, it seems that the $1 causes a problem - it's probably getting interpreted somewhere en route. I found that if I do:

    ipcId=ipcBeginProcess("rg 'Run Result\\s+:\\s+(\\w+)' -Nor '\\$1' ./folder/subfolder/filename.rep.cls")
    ipcWait(ipcId)
    data=ipcReadProcess(ipcId)

    then it should read the output of the command OK.

    Regards,

    Andrew

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

    Perfect, thanks a lot!

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Reply
  • Kevin Buck
    Kevin Buck over 3 years ago in reply to Andrew Beckett

    Perfect, thanks a lot!

    • 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