• 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 retrieve the variable which is defined in the SOC...

Stats

  • Locked Locked
  • Replies 5
  • Subscribers 90
  • Views 14078
  • 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 retrieve the variable which is defined in the SOC Encounter configure file ?

archive
archive over 18 years ago

I have some variable defined in my SOC Encounter’s configure file, such as set BLOCK CDMA200 set SPC_DIR /user/tom/3gmodule/CDMA In the Encounter shell environment, how can I retrieve the variable ${BLOCK}, and use it in my other scripts, I ask this question because I found it in inconvenient that I must defined some of variables both in the configure file and in my tcl scripts.


Originally posted in cdnusers.org by aidans
  • Cancel
  • archive
    archive over 18 years ago

    It looks like the variable defined in the .conf file are only available locally (ie, within the .conf file). If you want to be able to refer to variables set in the .conf file you could defined them as globals:

    design.conf:
    set rda_Input(ui_gen_footprint) {1}
    global bob
    set bob test

    encounter> loadConfig design.conf
    encounter> puts $bob
    test

    There may be other ways to retrieve some of the things you'd like to extract from the .conf file via FE db commands. For example CDMA200 might be the name of the top cell in your design so you could query that with an FE TCL command:

    encounter> dbgDesignName
    CDMA200

    Hope this helps,
    Bob


    Originally posted in cdnusers.org by BobD
    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • archive
    archive over 18 years ago

    Thanks Bob, It works well.


    Originally posted in cdnusers.org by aidans
    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • archive
    archive over 18 years ago

    moreover, I have another question.
    This is related to our golen.conf

    in the config fie there is this lines
    set rda_Input(ui_netlist) "$NETLIST"


    in our user defined tcl scripts, I write this:
    loadConfig golden.conf

    Now the question is, Is there is a way I can set the variable *NETLIST* in the user defined scipts. so that I don't need to copy the golden.conf and modified it.

    I tried the golbal thing you give to me,
    global NETLIST
    set NETLIST /path/to/verilog_file
    loadConfig golden.conf

    It failed to retrieve the $NETLIST


    encounter 6> loadconfig ../spc/tcl/golden.conf
    Reading config file - ../spc/tcl/golden.conf
    can't read "NETLIST": no such variable


    Anyway, I just try to setup more efficient design flow.
    Thank you in advance.




    Originally posted in cdnusers.org by aidans
    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • archive
    archive over 18 years ago

    Ah yes- I follow what you're trying to do. I think it's fairly common that you want to keep almost everything in a project/golden conf file, but you want to change just a couple of things (like the netlist or timing constraints or whatever).

    I usually do that this way:

    set NETLIST /path/to/verilog_file
    loadConfig golden.conf 0
    set rda_Input(ui_netlist) "$NETLIST"
    commitConfig

    The key is the "0" after loadConfig which is conceptually the same as what happens when you load a conf file via the GUI. Then clicking "OK" on the Design Import is the same as commitConfig.

    Do you think that will suit your needs?


    Originally posted in cdnusers.org by BobD
    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • archive
    archive over 18 years ago

    Yes, This is what I am looking for. Thank your for your support. You really explained it clearly. Thank you again.


    Originally posted in cdnusers.org by aidans
    • 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