• 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 to get absolute path of file/dir with Custom IC Ski...

Stats

  • Locked Locked
  • Replies 12
  • Subscribers 144
  • Views 10452
  • 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 to get absolute path of file/dir with Custom IC Skill

Phuong Truong
Phuong Truong over 5 years ago

Hi all,

I am beginner for Skill language. Please help to clarify that how to get absolute path of file/dir with Custom IC Skill.
Thank you.

Best Regards,

Phuong Truong

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

    I'm not entirely sure what you're asking for, but it's probably simplifyFilename. For example, simplifyFilename("./localFile") will convert it too the full path.

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Phuong Truong
    Phuong Truong over 5 years ago in reply to Andrew Beckett

    Hi Andrew,

    Thanks for your reply.

    In my question, I want to ask that how to get absolute path of file/dir with Custom IC Skill. And file/dir is any included ( localFile, external file,...)


    Example:

    Enter: ./filename.il
    Result: /parentA/parentB/parentC/../filename.il

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Reply
  • Phuong Truong
    Phuong Truong over 5 years ago in reply to Andrew Beckett

    Hi Andrew,

    Thanks for your reply.

    In my question, I want to ask that how to get absolute path of file/dir with Custom IC Skill. And file/dir is any included ( localFile, external file,...)


    Example:

    Enter: ./filename.il
    Result: /parentA/parentB/parentC/../filename.il

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Children
  • Andrew Beckett
    Andrew Beckett over 5 years ago in reply to Phuong Truong

    Not sure what you mean by "localFile" "external file" but did you actually try using simplifyFilename? That will give the full path for a local file or directory.

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Phuong Truong
    Phuong Truong over 5 years ago in reply to Andrew Beckett

    Yes, I tried to use simplifyFileName but the result is not my expectation. Actually, simplifyFilename(./filename) will return "/current_path/filename".
    But I want to return the absolute of filename ( filename here is in other direction, not in current direction).
    Please help me to clarify. 
    Thank you.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 5 years ago in reply to Phuong Truong

    I have no idea what you're talking about. What is "absolute of filename" or "filename here is in other direction, not in current direction"? What does the "direction" of a file mean? (files don't have directions - so I'm a bit mystified as to what you're asking).

    Perhaps you can give a detailed example - explaining where the file actually is on the file system, and what your working directory is, and what  you are expecting to pass to the function (assuming there is a function) and what you're expecting it to return.

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Phuong Truong
    Phuong Truong over 5 years ago in reply to Andrew Beckett

    Yes.
    Below are detailed information of example:
    My working directory is "/proj/cad/users/phuongtruong/skill_cadence/run_tools/virtuoso"
    File which need to get absolute path : absolute_path.il in directory "/proj/cad/users/phuongtruong/skill_cadence/sample/"

    ==> I need to get absolute path of file "absolute_path.il"

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 5 years ago in reply to Phuong Truong

    Isn't that just going to be:

    dir="/proj/cad/users/phuongtruong/skill_cadence/sample"
    file="absolute_path.il"
    fullPath=strcat(dir "/" file)

    Or if you want to resolve links etc, then it would be:

    simplyFilename(strcat(dir "/" file))

    I must be missing something here, because this seems pretty obvious - so I'm guessing you're really trying to ask something else.

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Phuong Truong
    Phuong Truong over 5 years ago in reply to Andrew Beckett

    Hi Andrew,
    The expected result is "/proj/cad/users/phuongtruong/skill_cadence/sample/absolute_path.il"

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 5 years ago in reply to Phuong Truong

    That's exactly what the strcat in my previous post gives. So is that what you want?

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Phuong Truong
    Phuong Truong over 5 years ago in reply to Andrew Beckett

    Hi Andrew,

    I re-tried to use simplifyFilename and the result as my expectation. Thank you very much for your help. 

    Best Regards,

    Phuong Truong

    • 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