• 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. Viewing a shell ascii file and creating a shell path

Stats

  • Locked Locked
  • Replies 12
  • Subscribers 143
  • Views 17615
  • 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

Viewing a shell ascii file and creating a shell path

jaleco
jaleco over 12 years ago

I am using the view() function to open an ascii file from the shell, but it opens the file in the form/window in Virtuoso looking at the tail end of the file.  EG if the ascii file is larger than the viewing window, the contents scroll down to the end of the file.  Is there a way to use view() to open an ascii file but have the first view in the Virtuoso window remain at the head end of the file so the user can then scroll down instead of up?

Also, how can we create a path to write to a file location and pull from a specified path location by getting a path string from dbFullPath() and modifying it?

I am creating a new file using the cell name retrieved from geGetEditCellView()->cellName, but want to write to the same path location returned by dbFullPath() - with the exception of the last directory location.

For example, dbFullPath() returns ".../MyLibrary/MyLayout/layout/layout.cdb"

I create a file called "MyLayout_newfile" and want to write to ".../MyLibrary/MyLayout/MyLayout_newfile"

How do I truncate the end of the path returned by dbFullPath() - losing the "/layout/layout.cdb" portion?

 

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

     The postFunc arg is the one I meant, but it's definitely not going to help if the child process is not actually exiting. That's the problem you have to solve.

    The challenge with using your ipcKillProcess() approach is that you are extremely susceptible to the time it takes to run. If the child process takes slightly too long, you may have killed it before it did anything yet...

    The horribly sloppy way of solving this is to:

    1. Start the job with ipcBeginProcess and record the job id somewhere
    2. Use hiRegTimer() to set up a command to invoke some time in the future to call ipcKillProcess() on the saved job id (making it long enough that the file will reasonably have been written)
    3. view() the file
    4. Use hiEnableTailViewfile to update it as the content changes
    5. Use hiScrollWindowTop or hiScrollWindowToIndex to scroll to the top (might have to hiDisableTailViewFile first)

    Or fix the script and spend the rest of the time that you would have spent implementing and debugging the above in the pub.

    Andrew.

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

     The postFunc arg is the one I meant, but it's definitely not going to help if the child process is not actually exiting. That's the problem you have to solve.

    The challenge with using your ipcKillProcess() approach is that you are extremely susceptible to the time it takes to run. If the child process takes slightly too long, you may have killed it before it did anything yet...

    The horribly sloppy way of solving this is to:

    1. Start the job with ipcBeginProcess and record the job id somewhere
    2. Use hiRegTimer() to set up a command to invoke some time in the future to call ipcKillProcess() on the saved job id (making it long enough that the file will reasonably have been written)
    3. view() the file
    4. Use hiEnableTailViewfile to update it as the content changes
    5. Use hiScrollWindowTop or hiScrollWindowToIndex to scroll to the top (might have to hiDisableTailViewFile first)

    Or fix the script and spend the rest of the time that you would have spent implementing and debugging the above in the pub.

    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