Question again on the setup files (.cdsinit, .cdsenv...)

Discussion in 'Cadence' started by Jay Smith, Apr 13, 2004.

  1. Jay Smith

    Jay Smith Guest

    Andrew (and all),

    1. Referring your answer in my previous thread, you said "as soon as
    one is found, it stops searching...". However, as I learnd from
    Cadence's manual and my personal experience, looks like Cadence will
    keep searching the .cdsinit and .cdsenv according to the sequence:
    site - ./ - home
    Otherwise users can't customrize their preference. I also found that,
    even if the .cdsenv file was deleted from user's home directory, icfb
    (or whatever) will automatically creat one.

    2. Is .cdsinit loaded before .cdsenv? In my .cdsinit, there's a SKILL
    (?) function: envLoadFile("./.cdsenv")

    3. What is the syntax used in .cdsinit and/or .cdsenv? Is that Spectre
    syntax?

    Sorry for throwing you so many questions. :)

    Jay
     
    Jay Smith, Apr 13, 2004
    #1
  2. Jay Smith

    Partha Guest

    When the Cadence software loads, it reads the site-specific settings
    first and individual settings last, so your settings override the
    others. Specifically, files are loaded in the following sequence:

    ..Xdefaults
    ..cdsenv
    ..cdsinit

    .cdsenv settings can be overriden by .cdsinit by the following,

    envSetVal( "tool.partition" "varName" 'varType value )

    For example:
    envSetVal( "spectreSVerilog.envOpts" "mspNetlistMode" 'string
    "Hierarchical" )


    In a broader sense for Cadence tool specific defaults use .cdsenv & to
    set shell variables and other skill customizations use .cdsinit

    Tool customizations:( in .cdsinit)
    envSetVal( "tool.partition" "varName" 'varType value )

    Shell variables:(in .cdsinit)

    setShellEnvVar("Environment variable=value")


    Tool customizations:( in .cdsenv)
    tool.partition varName 'varType value
     
    Partha, Apr 14, 2004
    #2
  3. Jay,

    Ah, I didn't make that clear. The .cdsinit stops searching - the .cdsenv doesn't - it
    merges them all together, and the latest loaded overrides the previous ones.

    However, if the .cdsinit keeps searching, it's because there's some code in
    the .cdsinit before it which keeps looking.
    No, .cdsenv is loaded first. However, by default it doesn't look in the
    working directory for .cdsenv file (this can be enabled using the
    CDS_LOAD_ENV UNIX env var), so an alternative is to load it
    using the envLoadFile() function like you said.
    ..cdsinit is SKILL. SKILL is a full featured programming language, and
    is very flexible indeed.

    ..cdsenv is it's own syntax - it's a simple:

    tool[.partition] varName type value

    Neither are spectre syntax. spectre is a simulator, and has its own syntax.
    Regards,

    Andrew.
     
    Andrew Beckett, Apr 14, 2004
    #3
  4. Jay Smith

    Jay Smith Guest

    So .cdsinit uses Unix shell syntax. .cdsenv uses SKILL syntax? Thanks!
     
    Jay Smith, Apr 14, 2004
    #4
  5. No, .cdsinit does NOT use UNIX shell syntax. Partha's reply was misleading.

    The purpose of the .cdsinit file is not to set UNIX shell environment variables - although you
    can do that there (in some cases; sometimes it will be too late to set it in the .cdsinit
    file). As you can see, you have to use a SKILL function to set a UNIX env var.

    Also, .cdsenv is NOT SKILL Syntax. You can set cdsenv variables in the .cdsinit
    using SKILL syntax, but the .cdsenv file is in .cdsenv syntax (see my other append on
    this).

    Andrew.
     
    Andrew Beckett, Apr 14, 2004
    #5
  6. Jay Smith

    Partha Guest

    Oops I did not mean that..:)


     
    Partha, Apr 14, 2004
    #6
  7. Jay Smith

    Guest Guest

    No, .cdsinit is interpreted by the Skill interpreter, so it should contain
    Skill commands.

    ..cdsenv is a list of variables and values using a predefined syntax, but uses
    Skill to parse the values, etc.

    And ~/.Xdefaults is read by the X initialization code, but ONLY if no X
    Resource DataBase has been attached to the display (typically by using the xrdb
    command, and most default X startup scripts do this by default). Note also
    that on some systems the the filename containing the resources my not be
    ".Xdefaults", but a different name. In most cases, though, the name is
    ".Xdefaults".

    -Pete Zakel
    ()

    "Black cat, yellow cat, as long as it catches mice it is a good cat."

    -Chinese Proverb
     
    Guest, Apr 14, 2004
    #7
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.