• 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 Design
  3. skill to get csh date time format instead of getCurrentTime...

Stats

  • Locked Locked
  • Replies 2
  • Subscribers 125
  • Views 4140
  • 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

skill to get csh date time format instead of getCurrentTime from skill

Monarch03116
Monarch03116 over 1 year ago

i will like to record the time while executing my callback.

However, i can get "Apr 3016:00:35 2024" with getCurrentTime.

i prefer to have format like "20240430_160038" with "date +%Y%m%d_%H%M%S" of csh.

Don't know how to call csh and get the format.

second question. 

i have existing script written with perl.

how to execute that script and get the result from it by skill code?

  • Cancel
Parents
  • Andrew Beckett
    Andrew Beckett over 1 year ago

    You could do this with an IPC call (ipcBeginProcess, ipcReadProcess) to launch the date command, but I'd use the built in time functions instead as this will be quicker and avoids launching an external program. For the perl script though, you could use that approach (id=ipcBeginProcess("perlcommand") ipcWait(id) result=ipcReadProcess(id) ).

    procedure(CCFformatTime()
      let(((tm timeToTm(stringToTime(getCurrentTime()))))
        lsprintf("%4d%02d%02d_%02d%02d%02d" 
          tm->tm_year+1900 tm->tm_mon+1 tm->tm_mday
          tm->tm_hour tm->tm_min tm->tm_sec)
      )
    )

    Andrew

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Monarch03116
    Monarch03116 over 1 year ago in reply to Andrew Beckett

    Thanks for your prompt reply

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Reply
  • Monarch03116
    Monarch03116 over 1 year ago in reply to Andrew Beckett

    Thanks for your prompt reply

    • 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