Home > Community > Forums > Digital Implementation > How to retrieve the variable which is defined in the SOC Encounter configure file ?

Email

* Required Fields

Recipients email * (separate multiple addresses with commas)

Your name *

Your email *

Message *

Contact Us

* Required Fields
First Name *

Last Name *

Email *

Company / Institution *

Comments: *

 How to retrieve the variable which is defined in the SOC Encounter configure file ?  

Last post Sun, Feb 4 2007 5:18 AM by archive. 5 replies.
Started by archive 04 Feb 2007 05:18 AM. Topic has 5 replies and 1974 views
Page 1 of 1 (6 items)
Sort Posts:
  • Sun, Feb 4 2007 5:18 AM

    • archive
    • Top 75 Contributor
    • Joined on Fri, Jul 4 2008
    • Posts 88
    • Points 4,930
    How to retrieve the variable which is defined in the SOC Encounter configure file ? Reply

    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
    • Post Points: 0
  • Wed, Feb 7 2007 7:16 PM

    • archive
    • Top 75 Contributor
    • Joined on Fri, Jul 4 2008
    • Posts 88
    • Points 4,930
    RE: How to retrieve the variable which is defined in the SOC Encounter configure file ? Reply

    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
    • Post Points: 0
  • Wed, Feb 7 2007 7:33 PM

    • archive
    • Top 75 Contributor
    • Joined on Fri, Jul 4 2008
    • Posts 88
    • Points 4,930
    RE: How to retrieve the variable which is defined in the SOC Encounter configure file ? Reply

    Thanks Bob, It works well.


    Originally posted in cdnusers.org by aidans
    • Post Points: 0
  • Wed, Feb 7 2007 7:43 PM

    • archive
    • Top 75 Contributor
    • Joined on Fri, Jul 4 2008
    • Posts 88
    • Points 4,930
    RE: How to retrieve the variable which is defined in the SOC Encounter configure file ? Reply

    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
    • Post Points: 0
  • Thu, Feb 8 2007 4:45 AM

    • archive
    • Top 75 Contributor
    • Joined on Fri, Jul 4 2008
    • Posts 88
    • Points 4,930
    RE: How to retrieve the variable which is defined in the SOC Encounter configure file ? Reply

    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
    • Post Points: 0
  • Thu, Feb 8 2007 5:09 AM

    • archive
    • Top 75 Contributor
    • Joined on Fri, Jul 4 2008
    • Posts 88
    • Points 4,930
    RE: How to retrieve the variable which is defined in the SOC Encounter configure file ? Reply

    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
    • Post Points: 0
Page 1 of 1 (6 items)
Sort Posts:
Started by archive at 04 Feb 2007 05:18 AM. Topic has 5 replies.