Tips And Tricks

This page gives tips and tricks for working in and customizing the Cadence environment.

Modifying your .cdsinit file

The .cdsinit file is an initialization file that runs when Cadence is starting. This section describes some useful additions to your .cdsinit file that you can add. The .cdsinit file is a hidden file and is often located in the directory where you start Cadence. This is not always the case and you may have to search for it. All these scripts can also be entered in the command line once cadence starts.

Changing the default text editor

When working with AHDL or VerilogA it is nice to have a choice of different text editors to use. To change the default text editor in Cadence, add the following to your .cdsinit file:

  • editor = "TEXT_EDITOR_NAME"

Where TEXT_EDITOR_NAME is an editor such as nedit, gedit, vim, ect. For a complete list of Linux text editors see:
http://en.wikipedia.org/wiki/Category:Linux_text_editors

Close the "What's new" window

  • ddsNewsClose()

Resize the Command Interface Window (CIW)

  • hiResizeWindow(window(1) list(1:25 800:200))

The CIW is the command line window. The window size and position is set by defining the pixel positions of the bottom-left (BL) and top-right (TR) location of the window. The bottom-left corner of the screen is the origin. The syntax is
list([BL_horizontal_position]:[BL_vertical_position] [TR_horizontal_position]:[TR_vertical_position])
list(1:25 800:200) sets it up in the bottom left part of the screen.

Open the library manager window

  • ddsOpenLibManager()

Load bindkeys

Bindkeys are keyboard button definitions for commonly used functions. The following two commands set the bindkeys to those that are used by the AMS groups.

  loadi "~cdsmgr/common/schBindKeys.il"
  loadi "~cdsmgr/common/leBindKeys.il"
  • The first file is for schematic bindkeys and the second is for layout bind keys. If you would like to change the bindkeys, you can copy these files to your home directory, edit them, and load them by changing the path in the commands above.
  • If you would like to create your own bindkey, you must first know the SKILL function of the command you are trying to bind. If you don't know the SKILL function you can find it by having cadence print all input activity in the command window. In the ICFB command window select Options->Log Filter...->Show Input->menu commands. Now when you activate a command through a menu or the mouse, its SKILL function will be displayed in the command window. Just copy this function into your bindkeys file with the same syntax as the other bind keys.
  • Note : The above command does not work on Cadence 6 if your .cdsinit file contains the following:
    let( (bindKeyFileList file path saveSkillPath)
        bindKeyFileList = '(
                   "common_bindkeys.il"     ; JTS, from Cadence
                    )

An easy fix if you have this script is to simply repalce the above with this:

    let( (bindKeyFileList file path saveSkillPath)
        bindKeyFileList = '(
                 "leBindKeys.il"
                 "schBindKeys.il"
                    )
  • Note 2: If you are using IBM processes, the "IBM_PDK" customization setup automatically adds the "IBM" Bindkeys. To replace them, just replace this path
        loadi(strcat( ibmPdkPath "cms9flp/V1.5.0.0IBM/cdslib/Skill/ibmPdkBindkeys.il")))

with your path like this:

        JonPath="/nfs/spectre/u9/guerberj/Cadence/90nm/IBM_90"
	loadi(strcat( JonPath "leBindkeys.il")))
        loadi(strcat( JonPath "schBindkeys.il")))

Changing the default simulation directory

  • envSetVal("asimenv.startup" "projectDir" 'string strcat("/scratch/" getShellEnvVar("USER")))

This sets the default simulation directory to /scratch/user_name where user_name is your login name. Adding the user name directory is a precaution so that other people will not over write your data. Storing data on scratch keeps your account space from filling up. Note that this is not backed up.

Another method would be to delete the default simulation directory for your process and replace it with a link to a scratch directory folder.

Set the undo limit to 10

  • hiSetUndoLimit(10)

Add a model files path

asiSetEnvOptionVal( asiGetTool('spectre) 'modelFiles '(("/model_file_path" "")) )

Unlock your files

Sometimes if your computer crashes or looses power while Cadence is open, many of your folders will have a file in them that ends in .cdslck. This file is created when you open a schematic for edit and prevents anyone from altering the file while you have it open. There are several ways to fix this problem:

  • Use the clsAdminTool
  1. The path for this tool is: /nfs/guille/a2/rh80apps/cadence/current/tools/bin/clsAdminTool
  2. Run clsAdminTool in a directory above your locked files.
  3. Type ale . to list locked files below the current directory.
  4. Type are . to unlock files below the current directory.
  • If you only had one or two windows open at the time of the crash, then just browse to the folder and delete the .cdslck file.
  • If you had many files open...
  1. Open a terminal and type cd ~ to return to your home directory
  2. Type find . -name "*.cdslck" This will find all the cdslck files.
  3. If you want to delete all of these files type find . -name "*.cdslck" -exec rm -f {} \; This will delete all files containing .cdslock in the filename.

You can make people very mad at you if you run this command in a group directory

Script to remove .cdslck files

Copy and Save the following code as rmlcks.sh


 #!/bin/sh 
tree -if | grep 'cdslck' > txt
var=`cat txt`
for i in $var; do
rm -i $i
done
rm -i txt

change permissions for rmlcks.sh by typing the following command in the terminal.
chmod 755 rmlcks.sh

The script will prompt for your confirmation for deleting the files. Press "Y" for the last option, remove regular empty file 'txt'.

Cadence Segmentation Faults

One of the Most annoying things is when cadence crashes. Here are some things that will cause Cadence to crash:

  1. In Virtuoso 6 do not hit the "Results > Print" Command while the simulation is running or else a crash is imminent

Cadence Not Printing Node Voltage/Current Data

If you have a situation where data isn't being printed (ie you get the error "no 'vt' data available for node /xxx) then the following might help:

  1. Make sure you are not trying to measure current of transistor or some other "unkept" node
  2. If you want to measure an internal node more then 2 levels down in the cadence block hierarchy you may have to save the node beforehand
  3. If its an obviously correct node that is not producing an output, you may have too big of a psf chunk of data for the internal plotter to grab. To fix this, copy "setenv PSF_WRITE_CHUNK_MODE_ON true" into your .cshrc file.

Stream Tools Not Working for GDS Generation due to ACE Interference

If the cadence stream tool GUI will not work due to interference from ACE wrappers, layout files can be exported though calibre. To do this, install calibre and goto calibre>DRC>Input and check the format "GDSII" and box "Export from Layout Viewer". The GDS will be created. To re-stream in, open cadence in the ACE wrapper (ACE513...) and stream into the National directory. Then manually copy this whole stream-in directory into your real working folder and open Cadence normally. Then by manually adding the library, you should be able to perform DRC check on the streamed in version.