• 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. Digital Implementation
  3. command line arguments into RC tcl scripts

Stats

  • Locked Locked
  • Replies 4
  • Subscribers 92
  • Views 16120
  • 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

command line arguments into RC tcl scripts

kasyab
kasyab over 14 years ago

Hi,

  Is it possible to pass command line arguments (similar to argv in normal tcl scripts) into RC tcl scripts?

What I understand is that, when  RC is invoked with a '-f' option it invokes the script in its own shell and then invokes the script specified. Supposing that for example, within this shell I wish to choose a list of libraries from three sets of libraries I have access to, through an option passed at runtime, how will I achieve this?

The intention is to create fairly generic synthesis scripts for an environment controlled by make targets.

Thanks in advance,

Kasyab

 

 

  • Cancel
  • kazad
    kazad over 14 years ago

    Hi Kasyab

    You can pass the library list and other variables from Makefile into RC. Here are the steps:

    In you Makefile:

    lib_dir = xx/yy/zz

    slow_lib_list = ${shell ls -1 ${lib_dir}/std_slow.lib} \
                    ${shell ls -1 ${lib_dir}/macro_slow.lib}

    fast_lib_list = ${shell ls -1 ${lib_dir}/std_fast.lib} \
                    ${shell ls -1 ${lib_dir}/macro_fast.lib}

    typ_lib_list = ${shell ls -1 ${lib_dir}/std_typ.lib} \
                    ${shell ls -1 ${lib_dir}/macro_typ.lib}


    In RC synthesis script:

    set_attribute library $env(slow_lib_list)

    Hope this helps.

     

    Khandaker

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • grasshopper
    grasshopper over 14 years ago

     Any reason you cannot do

     

    rc -f script.tcl -e 'set libFiles {slow_as_molasses.lib honking_memory.lib}'

     

    Diego-

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • grasshopper
    grasshopper over 14 years ago

     Any reason you cannot do

     

    rc -f script.tcl -ex 'set libFiles {slow_as_molasses.lib honking_memory.lib}' 

     

    later,

    gh-

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • kasyab
    kasyab over 14 years ago

     Thanks grashopper and kazad. I figured out a solution similar to the one proposed by kazad. That was the one more suitable to my needs. 

     

    grashopper: I was looking for ways to switch entire library sets and as far as I know, the way to do this was by switching the search path for those libraries at runtime. I may not have understood your solution completely, but what I understood from it was that you set all the variables through the '-ex' switch; this would have proved quite tedious in my case.

    • 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