• 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. Assign Shell output to Ocean variable

Stats

  • Locked Locked
  • Replies 6
  • Subscribers 143
  • Views 15746
  • 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

Assign Shell output to Ocean variable

The Setlaz
The Setlaz over 12 years ago

Hi,

 

I'd like to assign a shell command (sh or csh) output to an OCEAN variable but the problem is that Shell always return "t" and nothing else.

 

I would need to be able to get the results of a "pwd | cut -d "/" -f 8" command (that returns the name of my testbench which is the same as my testbench-cellview) where my script is loaded from, and put the results of this command in an OCEAN variable so that I can paste the name to the right directory to open all my result in batch.

 

My script would look like this :

 ----------------------------

newWindow()

corner_list='("corner_1" "corner_2" "corner_3")

simDir = "/home/my_name/path/to/all/testbench/"

testbench = sh("pwd | cut -d "/" -f 8")

foreach(corner corner_list)

openResults( strcat( simDir "/" testbench "/" corner ) )

selectResults( 'tran )

)

-------------------------

 

This script would be automatically load all my corner PSF results in Cadence Results Browser for "familly plot" without editing the script to change the testbench name inside before running it.

 

Thanks !

Damien

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

    Damien,

    I asked what getWorkingDir returns, not what nthelem returns. It was obvious from the error that nthelem must have returned nil.

    Can you show that in each case?

    Regards,

    Andrew.

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

    Damien,

    I asked what getWorkingDir returns, not what nthelem returns. It was obvious from the error that nthelem must have returned nil.

    Can you show that in each case?

    Regards,

    Andrew.

    • 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