• 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. standalone SKILL binary command line parsing weirdness

Stats

  • Locked Locked
  • Replies 1
  • Subscribers 144
  • Views 12945
  • 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

standalone SKILL binary command line parsing weirdness

tweeks
tweeks over 11 years ago

Check this out: create a SKILL script called myScript.il containing the following lines:

#!/usr/bin/env skill -64
(println (argv 1))

Watch what happens when you try to pass arguments:

tweeks@awesome> myScript.il -foo bar
"-foo"
*Error* load: can't access file - "bar"

Does anyone else think it's weird that the standalone SKILL executable interprets any arguments that don't start with a dash as a filename to load?

Besides being inconsistent with how interpreters usually work (bash, tcl, python, etc.), this curious feature makes it impossible to create dash options that take un-dashed arguments; e.g. you can't do this:

myScript.il -log ~/logs/myLog.log -mode r ~/tmp/stuff.oa

I'm sure there is a good reason (possibly long forgotten in SKILL's murky past....)

Also, the "-help" option appears to be broken:

tweeks@awesome> skill -help
*WARNING* Unsupported option "h" is ignored
*WARNING* Unsupported option "l" is ignored
*WARNING* Unsupported option "p" is ignored

What about "-e"? What does that do?

  • Cancel
  • tweeks
    tweeks over 11 years ago

    With further experimentation, I discovered the following Fun Facts:

     

    1. If you call exit() at the end of the script, SKILL does not attempt to load() the command line arguments as files.
    2. If an unhandled error() occurs, SKILL will attempt to load() the command line arguments as files.
    3. The interpreter prints a free newline for you.  (You can print a delete character to erase it, though.)
    Conclusion: the standalone SKILL binary is a little weird, but if you're careful, you can still get it to do what you want.

     

    • 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