• 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. How to pass a string variable in the addRings command?

Stats

  • Locked Locked
  • Replies 1
  • Subscribers 91
  • Views 11448
  • 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 pass a string variable in the addRings command?

vinayelk
vinayelk over 4 years ago

Hi,

I am trying to pass my metal layer information for the addRing command using some string variables. However, the console prints an error saying variable not found.

I am using the following command:

addRing -nets {VDD VSS} -type core_rings -follow core -layer {top $horzPowerLayer bottom $horzPowerLayer left $vertPowerLayer right $vertPowerLayer} -width {top 4 bottom 4 left 4 right 4 } -spacing {top 1.8 bottom 1.8 left 1.8 right 1.8} -offset {top 1.8 bottom 1.8 left 1.8 right 1.8} -center 1 -threshold 0 -jog_distance 0 -snap_wire_center_to_grid None

Following is the log that I see on the terminal:
#% Begin addRing (date=02/04 02:06:12, mem=820.9M)
#% End addRing (date=02/04 02:06:12, total cpu=0:00:00.0, real=0:00:00.0, peak res=820.9M, current mem=820.9M)
can't read "horzPowerLayer": no such variable

The variables $horzPowerLayer and $vertPowerLayer are M7 and M6 in values respectively which are read through a file. The values hold well before the addRing command is executed but they are not recognized in the command itself. Can someone please let me know the right way to pass this information? I plan to do the same for the dimensions as well so it would be helpful if you could include that in your discussion as well.

Thank You
Vinay

  • Cancel
Parents
  • Dimo M
    Dimo M over 4 years ago

    Hi Vinay,

    you are using curly brackets {} to group your argument, which disables substitution within the braces. You can use quotes "" to allow substitution:
    -layer "top $horzPowerLayer bottom $horzPowerLayer left $vertPowerLayer right $vertPowerLayer"

    You can read about grouping arguments with quotes and brackets here: 
    https://www.tcl.tk/man/tcl8.5/tutorial/Tcl3.html
    https://www.tcl.tk/man/tcl8.5/tutorial/Tcl4.html
    Dimo
    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Reply
  • Dimo M
    Dimo M over 4 years ago

    Hi Vinay,

    you are using curly brackets {} to group your argument, which disables substitution within the braces. You can use quotes "" to allow substitution:
    -layer "top $horzPowerLayer bottom $horzPowerLayer left $vertPowerLayer right $vertPowerLayer"

    You can read about grouping arguments with quotes and brackets here: 
    https://www.tcl.tk/man/tcl8.5/tutorial/Tcl3.html
    https://www.tcl.tk/man/tcl8.5/tutorial/Tcl4.html
    Dimo
    • 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