Product Documentation
Cadence Application Infrastructure User Guide
Product Version IC23.1, November 2023

3


Cadence Setup Search File: setup.loc

Cadence software includes the Cadence Setup Search File (CSF) mechanism to search for application setup and configuration information such as the following:

To find the application setup and configuration information, CSF uses the setup.loc file. The setup.loc file is an ASCII file that specifies the locations to be searched and the order in which they should be searched.

Search Order to Locate the setup.loc File

To find the setup.loc file or to search for setup and configuration information if no setup.loc file is found, Cadence Setup Search File (CSF) uses the following search order. It uses the first setup.loc file that is found.

For each of these locations, CSF looks in the following directories, in this order:

Cadence provides a default setup.loc file in the your_install_dir/share/cdssetup directory.

Related Topics

Locating Additional Files Using CSF

Cadence System Information File: cdsinfo.tag

Cadence Library Definition File

Cadence Data Registry File: data.reg

Search Mechanism in Cadence Setup Search File

To find setup and configuration information, Cadence Setup Search File (CSF) searches the locations specified in the setup.loc file, in the order in which they are listed, until a match is found.

For each location specified in the setup.loc file, except @LIBRARY, CSF looks in the following directories, in this order:

If the file being searched for is found in location/.cadence, the other directories are not searched. If the file is not found in location/.cadence, the location specified in the setup.loc file is searched. If the file is not found, then location/cdssetup is searched. If the file is not found there either, CSF looks at the next entry in the setup.loc file. It continues to search each entry in the setup.loc file in the same way until a match is found.

For an @LIBRARY entry in a setup.loc file, CSF searches design libraries listed in the library definition file, in the order in which they are listed. The @LIBRARY entry is ignored if the file being searched for is not a library file. For more information, see @LIBRARY.

With this search mechanism, you do not have to store your customized Cadence application configuration information directly in $HOME. Instead, these files can be stored under a cdssetup or .cadence subdirectory so that they can be accessed without overcrowding your home directory. Similarly, site information can be stored in a $CDS_SITE directory.

Default Search Order

Cadence provides a default setup.loc file in your_install_dir/share/cdssetup. This file specifies the following default search order, which includes commonly-used storage locations:

Location Description

.

Current directory

@LIBRARY

Libraries listed in the library definition file

$CDS_WORKAREA*

User workarea

$CDS_SEARCHDIR*

No longer set by applications

$HOME

Home directory

$CDS_PROJECT*

Project storage area

$CDS_SITE**

Site setup information

$(compute:THIS_TOOL_INST_ROOT)/share

Cadence default setup information

  1. * Ignored if undefined
  2. ** Defaults to your_install_dir/share/local

If the value of CDS_LOAD_ENV is set to CSF, then the first directory found in setup.loc is considered to be the default directory to which .cdsenv to be saved.

Commonly Searched Locations

Commonly-used storage locations for setup and configuration files are described below. Most of these locations are defined in the default setup.loc file.

Location Description

.

The current directory.

$CDS_WORKAREA

A workarea stores your project-specific customizations.

You should not to set the $CDS_WORKAREA environment variable in .cdsinit. It is always recommended to set the $CDS_WORKAREA shell environment variable before starting Virtuoso. The value of $CDS_WORKAREA is a path to the workarea directory.

$CDS_SEARCHDIR

$CDS_SEARCHDIR is no longer set by Cadence applications. Do not set this variable yourself.

$HOME

The home directory is the primary location for user-specific customization.

$CDS_PROJECT

A project contains information that is specific to the project and is not likely to change over the life of the project.

$CDS_SITE

Your site configuration is the primary location for you to customize the software for your site. Customization at this level is independent of any project and can be overridden by individual projects. You can also install default methodologies in this location. Other environment variable values are overwritten at startup with the computed values of this configuration.

$CDS_SITE is the only environment variable that you use without setting it explicitly in your .cshrc or .login files. If $CDS_SITE is not defined, it defaults to your_install_dir/share/local.

$(compute:THIS_TOOL_INST_ROOT)/share

This directory contains the application default setup information.

@LIBRARY

When the reserved keyword @LIBRARY is specified in a setup.loc file, CSF searches design libraries listed in the library definition file, in the order in which they are listed.

Only the library directory is searched. Unlike for other entries in the setup.loc file, CSF does not look for the subdirectories .cadence and cdssetup in libraries.

Libraries are searched only if the file being looked for contains library information, for example, a Virtuoso XL mapping file. Otherwise, the @LIBRARY entry is ignored.

Related Topics

Specifying Environment Settings

Customizing the Search Mechanism

Customizing the Search Mechanism

You can customize the search order of the setup and configuration files by creating your own setup.loc file that specifies the locations to be searched and the order in which they should be searched.

Do not modify the default setup.loc file provided by Cadence.

To create a setup.loc file:

  1. Create a file named setup.loc in any directory Cadence Setup Search File (CSF) searches for the setup.loc file. You can do this by copying the default setup.loc file your_install_dir/share/cdssetup/setup.loc to the required location or by using a text editor to create a new ASCII file.
  2. Edit the file in following ways:
    • Change the order of the default search locations. See Default Search Order for a list of default locations and their suggested use.
    • Delete any locations that you do not want CSF to search.
    • Add new locations that you want CSF to search.
      Specify the paths in the order in which you want them searched. Separate paths with newlines. Paths can contain environment variables, ~, and installation root expressions.

    CSF searches the locations in the setup.loc file in the order in which they are listed. Also, for each location, CSF searches location/.cadence, location, and location/cdssetup.

Specifying Custom Search Order for .cdsenv

The CDS_LOAD_ENV shell environment variable is used to specify a custom search order for .cdsenv. This variable does not affect the search order of other setup files, such as cds.lib, cdsinfo.tag, setup.loc, and csfLookupConfig.

Some setup files are searched for the first match found, while others are searched for all matches found.

Related Topics

Syntax and File Formats in the setup.loc File

Search Order to Locate the setup.loc File

Syntax and File Formats in the setup.loc File

The setup.loc file consist of a set of lines with a simple syntax:

Installation Root Expressions

You can use the following expressions in any path you specify in the setup.loc file to refer to the installation root of Cadence hierarchies. These are not environment variables and you do not need to set them in.cshrc or .login files.

Command Description

$(compute:THIS_TOOL_INST_ROOT)    

Interpreted as the root of the installation hierarchy of the application that is reading the setup.loc file. If the application is not in a Cadence installation hierarchy, an error occurs.

$(csf_search:somePathlette)    

Specifies that a search for a path fragment is to be performed in each location specified in setup.loc. The path being resolved to the first match found.

$(compute:THIS_FILE_INST_ROOT)    

Interpreted as the root of the installation hierarchy of the setup.loc file that is being read. If the setup.loc file is not in an installation hierarchy, an error occurs.

$(inst_root_with:pathRelativeToRoot)    

where pathRelativeToRoot is the path (relative to the root of the installation hierarchy) to a file or directory.

This expression is interpreted as the root of the first installation hierarchy found in $PATH that contains pathRelativeToRoot. If you are using applications in the Stream Manager environment, this expression is interpreted as the root of the first installation hierarchy found in $CDS_STRM_DIR_LIST that contains pathRelativeToRoot. If pathRelativeToRoot is not found, an error occurs.

Related Topics

Commonly Searched Locations

Search Mechanism in Cadence Setup Search File

Locating Additional Files Using CSF

Some common configuration files, such as cds.lib and cdsinfo.tag, can be easily found while running a search using Cadence Setup Search File (CSF). You can specify that Cadence applications also locate other configuration files, such as .cdsinit or .cdsenv, through Cadence Setup Search File mechanism. This enables you to customize the search order for these files.

To specify files that are to be found through CSF,

  1. Create an ASCII file named csfLookupConfig in any directory that is listed in your setup.loc file, for example $CDS_SITE or $HOME. The csfLookupConfig file itself is found through CSF.
  2. In the csfLookupConfig file, specify the files that you want found through CSF.
    A sample file, csfLookupConfig.sample, is located in your_install_dir/share/cdssetup. You can copy this file and modify it for your needs.

csfLookupConfig File Format

Use the following keywords in your csfLookupConfig file to specify the files to be found through CSF:

Keyword Description

ALL

Use CSF search for all configuration files

NONE

Do not use CSF search for any configuration file

INCLUDE fileName

Use CSF search to find fileName

fileName

Use CSF search to find fileName

EXCLUDE fileName

Do not use CSF search to find fileName

LOAD fileName

Use to specify that a file that contains csfLookupConfig statements should be loaded.

If a relative filepath is specified, it is resolved relative to the location of the file that contains the LOAD/SOFTLOAD statement.

The filepath can be specified as a string or an expression using either $(csf_search:somePathlette) or $(compute:THIS_TOOL_INST_ROOT).

An error is displayed if the specified file is not found.

SOFTLOAD fileName

As above (LOAD), but no error is displayed if the specified file is not found.

The following rules apply to the csfLookupConfig file:

Checking Files Searched Using CSF

You can check whether a specific file is found through CSF by using the cdswhich command:

cdswhich -lookupconfig fileName ...

If a csfLookupConfig file specifies that a fileName can be found through CSF, then the path of the file is returned, for example:

Info (cdswhich): ’.cdsinit’ found at:
./.cdsinit

If a csfLookupConfig file is not found or does not specify that fileName to be found through CSF, then the following message is returned:

Info (cdswhich): Cadence software is not configured to locate file ’.cdsinit’ via Cadence File Search mechanism

Related Topics

CSF Support For Third-Party Simulators

The cdswhich Command

CSF Support For Third-Party Simulators

This topic contains sample information, for both end-users and EDA vendors, regarding the integration of third-party tools using Cadence Setup Search File (CSF).

For example, your csfLookupConfig contained:

SOFTLOAD $(csf_search:mentor.conf)
SOFTLOAD $(csf_search:agilent.conf)
SOFTLOAD $(csf_search:bda.conf)
SOFTLOAD $(csf_search:silvaco.conf)

Then third-party vendors can maintain their own files, and it always be possible to pick up the latest versions.

The data.reg command can also be used to perform something similar:

SOFTINCLUDE $(csf_search:mentor.reg);
SOFTINCLUDE $(csf_search:agilent.reg);
SOFTINCLUDE $(csf_search:bda.reg);
SOFTINCLUDE $(csf_search:silvaco.reg);

The idea in both of these example scenarios is that $(csf_search:…) would look for the correct file using the CSF mechanism, and consequently complete control over the specified locations could be performed using the setup.loc file. The setup.loc file could also either use hard paths, or environment variables to indicate a search order. Because SOFT versions of these commands have been used in the examples, the data.reg and csfLookupConfig files could remain unchanged, even if specific software was not enabled within your environment, for example, if a module had not been loaded.

Integration Recommendations for EDA Vendors

These guidelines contain recommendations from Cadence to third-party EDA vendors, for the integration of their tools using SOFTLOAD and SOFTINCLUDE:

Example of Vendor Site Directory

–andrewb_14> ls -lG mentor_site
total 300
-rw-r--r-- 1 andrewb 59659 Nov 19 13:24 ADVance_MS.cdsenv
-rw-r--r-- 1 andrewb 5528 Nov 19 13:24 adit.cdsenv
-rw-r--r-- 1 andrewb 6024 Nov 19 13:24 adit_sp.cdsenv
-rw-r--r-- 1 andrewb 10763 Nov 19 13:24 artist_link.cdsenv
-rw-r--r-- 1 andrewb 2111 Nov 19 13:24 auCore.cdsenv
drwxr-xr-x 4 andrewb 4096 Nov 19 12:20 cdssetup/
-rw-r--r-- 1 andrewb 1757 Nov 19 13:25 csfLookupConfig
-rw-r--r-- 1 andrewb 277 Nov 19 13:31 data.reg
-rw-r--r-- 1 andrewb 49261 Nov 19 13:24 eldoD.cdsenv
-rw-r--r-- 1 andrewb 53148 Nov 19 13:24 eldoD_sp.cdsenv
drwxr-xr-x 3 andrewb 4096 Nov 19 12:10 hierEditor/
drwxr-xr-x 2 andrewb 4096 Nov 19 12:34 hnl/
lrwxrwxrwx 1 andrewb 15 Mar 18 16:19 mentor.conf -> csfLookupConfig
lrwxrwxrwx 1 andrewb 8 Nov 19 16:53 mentor.reg -> data.reg
drwxr-xr-x 2 andrewb 4096 Nov 19 13:25 menus/
drwxr-xr-x 3 andrewb 4096 Nov 19 12:34 si/
-rw-r--r-- 1 andrewb 59537 Nov 19 13:24 spectre2eldoD.cdsenv
INCLUDE hnl/eldoD.ile
INCLUDE hnl/ADVance_MS.ile
INCLUDE hnl/adit.ile
INCLUDE hnl/eldoD_sp.ile
INCLUDE hnl/adit_sp.ile
INCLUDE si/caplib/eldoD.ile
INCLUDE si/caplib/ADVance_MS.ile
INCLUDE si/caplib/adit.ile
INCLUDE si/caplib/eldoD_sp.ile
INCLUDE si/caplib/adit_sp.ile
INCLUDE .cdsenv
INCLUDE cdssetup/registry/data/advance_ms.reg; 
INCLUDE cdssetup/registry/data/netlist.reg;
INCLUDE cdssetup/registry/data/verilogAe.reg;
INCLUDE cdssetup/registry/tools/advance_ms.reg;
INCLUDE cdssetup/registry/tools/netlist.reg;
INCLUDE cdssetup/registry/tools/verilogAe.reg;

Related Topics

Locating Additional Files Using CSF

The cdswhich Command

The cdswhich command is a test, debug, and administration tool for managing the CSF search mechanism. It is located in your_install_dir/tools/bin.

cdswhich command has the following syntax:

cdswhich [-debug] [-all] filename
cdswhich [-debug] [-where path] [-formaldir path] filename
cdswhich [-debug] -lookupconfig filename ...
cdswhich [-debug] -findsetuploc

Command Options

Command Description

-debug

Displays information about the file paths that are examined when searching for files.

-all

Lists all occurrences of filename in all search locations, not only the first occurance.

The search locations are the locations listed in the setup.loc file found by CSF. cdssetup and .cadence subdirectories are also searched.

-where path

Searches a specific location for filename. Only the same path specified is searched; cdssetup and .cadence subdirectories are not searched.

For example:

cdswhich -where mnt3/RunTools myFile

-formaldir path

Searches for filename in the /path subdirectories of search locations if filename is not found in the search locations.

path must be a subdirectory path. The search locations are the locations specified in the setup.loc file found by CSF. cdssetup and .cadence subdirectories are not searched by default.

For example:

cdswhich -formaldir cdssetup myFile

searches for myFile in the cdssetup subdirectory of each search location listed in the setup.loc file, if the file is not found in the search location directory itself.

-lookupconfig fileName

Determines whether the csfLookupConfig file includes a valid value in fileName and the CSF search can be completed.

-findsetuploc

Writes filepath to the setup.loc file that specifies the CSF search locations.

CSF uses the default search order to locate setup.loc. A customized setup.loc file can result in % cdswhich setup.loc, which can write a different filepath.

If you do not specify any options with the cdswhich command, only the first file found is reported.

Examples

cdswhich cds.lib 
cdswhich -all cds.lib
cdswhich -where /usr1/mnt3/ns/Examples testFile
cdswhich -formaldir Examples testFile
cdswhich -lookupconfig .cdsinit

Related Topics

Locating Additional Files Using CSF

Locating Additional Files Using CSF

Syntax and File Formats in the setup.loc File


Return to top
 ⠀
X