• 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. How do you set a SKILL variable value to a shell evaluation...

Stats

  • Locked Locked
  • Replies 10
  • Subscribers 143
  • Views 20306
  • 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

How do you set a SKILL variable value to a shell evaluation?

jaleco
jaleco over 8 years ago

Using v5141, I am trying to set a SKILL variable value to be the result of a shell evaluation (which should return a text string). 

The shell operation is on a file generated during the Virtuoso session, otherwise it could be set in the .cdsinit or shell prior to running Virtuoso.

For example in Virtuoso I have just generated a log file:

myvar=system("grep myword mylogfile")

The system (or shell) command will write the text string to stdout of the shell, but puts the return value of the system() process into the SKILL variable.

While the shell will display the result of the grep operation (eg "myword"), the CIW gets a process return value, not the result of the grep.

printf("%L" myvar) ==> 0

I have tried using setShellEnvVar() to assign the variable to be in the shell and then reading it in.

setShellEnvVar("myvar=`grep myword mylogfile`")

But getShellEnvVar() returns the literal unevaluated string, not the shell evaluation.

getShellEnvVar("myvar") ==> "`grep myword mylogfile`"

How do you assign a SKILL variable value to the the string result of a shell operation like grep?

  • Cancel
Parents
  • jaleco
    jaleco over 8 years ago
    Sorry, I missed that part of your sample code....specifically called out.
    One last tip for others - remove the trailing newline of the string value with a pipe to transliterate -
    grep .....| tr -d '\n'
    and ipcReadProcess(cid) should return ==> "myword" instead of "myword\n"
    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Reply
  • jaleco
    jaleco over 8 years ago
    Sorry, I missed that part of your sample code....specifically called out.
    One last tip for others - remove the trailing newline of the string value with a pipe to transliterate -
    grep .....| tr -d '\n'
    and ipcReadProcess(cid) should return ==> "myword" instead of "myword\n"
    • 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