This file describes the actions needed to install the N.C. State University Cadence Design Kit (NCSU CDK).
$CDS_DIR == The top level of the Cadence installation
tree.
$IC_DIR == The top level of the IC STREAM.
This document contains the following sections:
These instructions assume you already have the Cadence tool set (e.g. IC 4.4.5) installed and operational. At NCSU we run Cadence (basically IC 4.4.5 and LDV 3.0) on Sun workstations under Solaris 2.6. Our kit has not been tested on other platforms, but there should not be any platform dependent operations in the kit.
Go to the
NCSU CDK download page and get a copy. Then, copy the file to where
you want the CDK files to live, cd to that directory and uncompress and
untar the file. (Note that you should probably un-set your file
permissions mask and untar using the -p (preserve permissions) switch,
e.g. umask 000; tar xpf NCSU_CDK.1.1.tar
at the shell
prompt.)
Note: we have set the kit up to be installed as a sub-directory called local, which can exist in any directory. Ideally it exists as $CDS_DIR/local, but if you already have a directory there, it can go somewhere else. (We call this a ``relocatable installation.'') In that case, however, the install script will need to modify some site-wide files at the top level of the Cadence hierarchy, so you'll probably need some type of sysadmin privileges anyway. See the list of what the install script does below.
You should now have a local/ sub-directory with the unpacked kit. We'll refer to this directory as $cdk_dir from here on.
local/environment/environment
in the CDK for the version we
use at N.C. State). A couple of things to note:
The CDK uses the environment variable CDS_SITE to locate its components at runtime. Therefore it is essential to set this variable to the $cdk_dir directory before starting Cadence.
The kit uses the analog netlister in concert with the CDF data on the components to create all netlists, including netlists for LVS, so make sure the environment variable CDS_Netlisting_Mode is set to Analog.
We have found it helpful to start the file locking daemon, clsbd, as root. Thus, we have a compiled program called ``bar'' which is suid to root and called during the user setup (bar simply starts clsbd). Having the lock daemon running as root prevents it from prematurely being stopped by a user process. You can also start clsbd as root during machine boot up, or wait for the tool to start it automatically.
Compile the clsbd startup program ``bar'' in $cdk_dir/bin (after editing it to point to the correct clsbd executable) and setuid root. This binary starts the clsbd file-locking daemon as root on the local machine during user setup. Make sure the user startup scripts reference the platform correctly.
Compile (if necessary) the two programs "imager" and "xlator" in $cdk_dir/skill/menus/ncsu/p2m. These programs are used to import images into the layout view. If you're running Solaris 2.5.1, 2.6 or 2.7, you might want to try importing a JPEG in Virtuoso (choose the ``NCSU->Import JPEG picture...'' menu entry) before you recompile these, as they might work as-is.
If you're not running Solaris 2.5.1, 2.6 or 2.7, un-tar and compile the stuff in $cdk_dir/skill/menus/ncsu/t2m/txt2layout.tar. You'll only need to keep the ``txt2skill'' executable. If you're running one of the above Solaris releases, the supplied executable may work as-is. You can test it by just typing txt2skilll -h (cd to $ckd_dir/skill/menus/ncsu/t2m first, of course); if it gives you a help message, it should work.
Run the Perl script $cdk_dir/bin/install.pl to automatically change all the $IC_DIR paths in the kit to ones appropriate for your site and link in the kit to your installation. Or you can manually perform the actions, which are detailed below. (If Perl is not installed in /usr/local/bin, change the first line of the script to reflect the correct path.)
Note: At NCSU we use symbolic links under the top level of the Cadence tree for each tool stream installed. For example, suppose the ic445 tools are installed at /path/cadence/ic445. We have a symbolic link called ic that points to the ic445 stream release. The command ls -l /path/cadence/ic would show:
/path/cadence/ic -> /path/cadence/ic445This makes it easier to upgrade to a newer version of each tools stream. You install the upgrade with a new stream name (e.g. ic446), and when it is tested just point the ic link at the new tree. Users always go through /path/cadence/ic to access the tools in this stream. It also solves the problem where some tools, like Verilog (in the ldv stream), store information containing the absolute path. In the case of Verilog this is the executable path/name. If the path changes, as it may if you install a new release, users with old simulation runs will get errors until they manually change the Verilog executable path. Always going through the same link keeps the path consistent and avoids these errors. Use /path/cadence/ic if you have one available in the install.pl script.
Update the file in $cdk_dir/cdssetup/newusermesg. This message is optionally displayed at Cadence startup by the script $cdk_dir/bin/xmesg (see around line 155 of $cdk_dir/cdssetup/cdsinit). (If wish is not installed in /usr/local/bin, change the first line of the script to reflect the correct path.)
Edit the plotter setup file, $cdk_dir/cdssetup/cdsplotinit to reflect your installation.
Check the library paths in $cdk_dir/cdssetup/cds.lib and all the entries included there to make sure the libraries are accessible, especially the ones included in the Cadence distribution.
If necessary, change the permissions throughout the local directory so users have the appropriate access. This will depend on your site installation. For example, we use AFS and set access using the AFS file permissions mechanisms.
These are the operations performed by $cdk_dir/bin/install.pl. They are listed here for reference, but we recommend that you run the script instead of doing them by hand.
Links are needed in the hierarchy of all installed platform types (sun4v, hp, etc).
Add a link from $IC_DIR/tools/dfII/local -> $cdk_dir. If $IC_DIR/tools/dfII/local already exists, you can rename it and do the link above. Or, if you want the NCSU CDK to co-exist with your current setup (a ``relocatable installation''), you can change some site files so that the NCSU CDK customizations are loaded only if the environment variable USE_NCSU_CDK is set:
if( getShellEnvVar( "USE_NCSU_CDK" ) != nil then load( "$cdk_dir/cdssetup/cdsinit" ) )
to the beginning. Again, the point is to load the NCSU CDK cdsinit file if the variable USE_NCSU_CDK is set, and the existing one otherwise.
Other files are modified in a similar way. In $IC_DIRtools/dfII/local/cdssetup/display.drf, add the following code to the end of the file:
if( getShellEnvVar( "USE_NCSU_CDK" ) != nil then load( "$cdk_dir/cdssetup/display.drf" ) )
In $IC_DIRtools/dfII/local/.simrc, add the following code to the end of the file:
if( getShellEnvVar( "USE_NCSU_CDK" ) != nil then load( "$cdk_dir/cdssetup/simrc" ) )
In $IC_DIRtools/dfII/etc/tools/menus/ciw.menus, add the following code to the end of the file:
if( getShellEnvVar( "USE_NCSU_CDK" ) != nil then load( "$cdk_dir/menus/ciw.menus" ) )
In $IC_DIRtools/dfII/etc/tools/menus/simui.menus, add the following code to the end of the file:
if( getShellEnvVar( "USE_NCSU_CDK" ) != nil then load( "$cdk_dir/menus/simui.menus" ) )
If you choose this route, remember to have your users
execute both a setenv USE_NCSU_CDK
and a setenv
CDS_SITE $cdk_dir
before starting Cadence to access the NCSU
CDK features.
Link the .cdsplotinit file from $IC_DIR/tools/plot/.cdsplotinit -> $cdk_dir/cdssetup/cdsplotinit if you want to use the NCSU CDK plot initialization file.
Link in the help files. $IC_DIR/doc/openbook/config/hrfs/ncsuHelp.HRF -> $cdk_dir/doc/ncsuHelp.HRF
In $IC_DIR/tools/dfII/bin, copy hspice to a backup version and make a link to $cdk_dir/bin/hspice
Change the search locations in the $cdk_dir/cdssetup/cdsenv file to use pathnames appropriate for your site. Look for:
cdsSpice.envOpts modelPath string "~/cadence/models $cdk_dir/models"
hspiceS.envOpts modelPath string "~/cadence/models/hspice $cdk_dir/models/hspice"
spectreS.envOpts modelPath string "~/cadence/models/spectre $cdk_dir/models/spectre"
graphic drfPath string "$cdk_dir/cdssetup/display.drf"
Change the Diva rules files links in the technology libraries to point to the Diva files in the directory $cdk_dir/techfile.
set hspice = (hspice_dir)
set hsppgm = (hspice_exe) [(hspice_dir)/bin/hspice]
setenv LM_LICENSE_FILE (hspice_license) [(hspice_dir)/license.dat]
NOTE: The NCSU setup uses HSPICE with the Flex license manager. We have not tested the installation with the (old) permit.hsp license system.
There's no formal way to verify everything's hooked in properly, but you can check pretty quickly to see if things look ok:
Set any environment variables necessary (e.g., $CDS_SITE, $USE_NCSU_CDK) and start Cadence.
Make sure you see the message Loading NCSU SKILL routines... in the CIW during startup. If you're running DFII 4.4.2.100.22 or later, you should also see the message Loading NCSU Library Manager customizations...done. in the Library Manager.
Type NCSU_CDK_version in the CIW and hit RETURN; you should get back a version string, e.g. ``NCSU_CDK 1.2''.
Select the ``File->New->Library...'' menu entry in the CIW. A form should appear that looks like the picture below:
Click the ``Help'' button and make sure the appropriate OpenBook entry appears.
Create a library by choosing ``Compile tech file'' and selecting a MOSIS process from the popup menu that appears. You should see the following messages in the CIW:
Loading technology files... Compiling class 'controls'.... Compiling class 'layerDefinitions'.... Compiling class 'devices'.... Compiling class 'layerRules'.... Compiling class 'physicalRules'.... Compiling class 'dleRules'.... Compiling class 'dlrRules'.... Storing symbolic cells... Generating Pcell for 'm1_n layout'. Generating Pcell for 'm1_p layout'. Generating Pcell for 'm1_poly layout'. Generating Pcell for 'm2_m1 layout'. Generating Pcell for 'nmos layout'. Generating Pcell for 'pmos layout'. Generating Pcell for 'ntap layout'. Generating Pcell for 'ptap layout'. Generating Pcell for 'm1_elec layout'. Creating links to Diva verification rules files... Library creation successfully completed.
You might also see some lines like Loading XXX.cxt. Also, the exact Pcells generated will depend on the process you chose.
Create and open a layout in the new library. In the LSW, nwell should be green slash, metal 1 should be blue backslash, metal 2 should be magenta dots. The last menu in the layout window's menu bar should be ``NCSU'' and have the following entries:
Open Analog Artist (``Tools->Analog Environment->Simulation...'' in the CIW) and verify the menu entry ``Setup->Model Corner...'' exists.
If all these are like they should be, you probably have everything installed correctly.
#---- Cadence user setup ----------------------------------------------
# see local/environment/environment for the full setup script we use at
# N.C. State.
# replace $CDS_DIR below with the root directory of your Cadence
# installation, and $UNAME with the full path to your uname executable
set base_dir = "$CDS_DIR"
set uname = "$UNAME"
# These are paths to the STREAM release directories (e.g. where IC 4.4.5
# lives); change these to fit your site
setenv IC $base_dir/ic
setenv LDV $base_dir/ldv
setenv CDS $base_dir
setenv CDS_LIC_FILE $CDS/share/license/license.dat
setenv TERM $term
# the lib path setup looks at $CDS_SITE/cdssetup to find the "setup.loc"
# file (other things, like prependNCSUCDKInstallPath(), need $CDS_SITE
# as well)
# note that "$cdk_dir" below is the local/ directory created when you
# untarred the CDK distribution
setenv CDS_SITE $cdk_dir
# if you did a "relocatable installation",
# set USE_NCSU_CDK to access the CDK features
setenv USE_NCSU_CDK
# use analog netlister for everything
setenv CDS_Netlisting_Mode Analog
# Path additions
alias prepend 'if (-d \!:2) if ("$\!:1" \!~ *"\!:2"*) setenv \!:1 "\!:2":${\!:1}'
alias extend 'if (-d \!:2) if ("$\!:1" \!~ *"\!:2"*) setenv \!:1 ${\!:1}:\!:2'
prepend PATH $LDV/tools/bin
prepend PATH $LDV/tools/dfII/bin
prepend PATH $IC/tools/bin
prepend PATH $IC/tools/dfII/bin
prepend PATH $IC/tools/concice/bin
prepend PATH $IC/tools/dracula/bin
extend MANPATH $LDV/share/man
extend MANPATH $IC/share/man
extend MANPATH $IC/tools/man
prepend LD_LIBRARY_PATH $LDV/tools/lib
prepend LD_LIBRARY_PATH $IC/tools/lib
# this next one sets a path to our wrapper script; the script
# removes this PATH component to unmask the real executable. ONLY USE
# THIS IF YOU"RE USING THE local/bin/dfiiwrapper.pl SCRIPT.
setenv PATH $CDS/bin:$PATH
#---- Start clsbd -----------------------------------------------------
# clsbd should always be running when we start cadence tools
# note that "bar" is a simple suid root program that starts clsbd (the
# theory is that if it's running as root, a userland process is less
# likely to take it down, and it won't be killed when the user logs out.
# we want this because clsbd needs to be running on all workstations
# that run cadence tools so it can respond to queries about locks. see
# chapter 11 of "Cadence Application Infrastructure User Guide" for more
# info on cls.)
if (( "`${uname} -sr`" == "SunOS 5.4") || ( "`${uname} -sr`" == "SunOS 5.5.1") || ( "`${uname} -sr`" == "SunOS 5.6")) then
$CDS_SITE/bin/bar > /dev/null
else
$IC/tools/bin/clsbd > /dev/null
endif
unset base_dir uname
#---- End of Cadence Setup --------------------------------------