Tips & Tricks: Difference between revisions

From VLSI
Jump to navigation Jump to search
New page: ==Set # of sig figs on schematic annotation== Sometimes the number of significant figures on schematic annotations (node voltages, for example) is very high and it becomes difficult to rea...
 
Radodge (talk | contribs)
 
(32 intermediate revisions by 5 users not shown)
Line 1: Line 1:
= Cadence Tips and Tricks =
==Change Waveform Graph windows default settings==
Add some of the following lines to '''.cdsenv''' file to change the window size, background/foreground color, font size, line thickness,and etc.
<blockquote><pre>
;width
viva.graphFrame width string "900"
;height
viva.graphFrame height string "700"
;background color
viva.graphFrame background string "white"
;foreground color
viva.graphFrame foreground string "black"
;axis font
viva.axis font string "Fixed [Misc],14,-1,5,50,0,0,0,0,0"
;marker font
viva.pointMarker font string "Fixed [Misc],14,-1,5,50,0,0,0,0,0"
viva.horizMarker font string "Fixed [Misc],14,-1,5,50,0,0,0,0,0"
viva.vertMarker font string "Fixed [Misc],14,-1,5,50,0,0,0,0,0"
viva.multiDeltaMarker font string "Fixed [Misc],14,-1,5,50,0,0,0,0,0"
viva.refPointMarker font string "Fixed [Misc],14,-1,5,50,0,0,0,0,0"
;line thickness
viva.trace lineThickness string "thick"
</pre></blockquote>
You may also use envSetVal to set the environment. For example, to set the background to white, type the following in the CIW window.
<blockquote><pre>
envSetVal(“viva.graphFrame” “background” 'string “white”)
</pre></blockquote>
==Set the default script/veriogA editor in Cadence to gedit==
*Option 1: type the following in CIW command line
<code>editor="gedit"</code>
*Option 2: add the line to .cdsinit
<code>editor="gedit"</code>
==Set # of sig figs on schematic annotation==
==Set # of sig figs on schematic annotation==
Sometimes the number of significant figures on schematic annotations (node voltages, for example) is very high and it becomes difficult to read.  To fix this, type the following into the icfb window:
Sometimes the number of significant figures on schematic annotations (node voltages, for example) is very high and it becomes difficult to read.  To fix this, type the following into the icfb window:
Line 4: Line 41:
<code>envSetVal("auCore.misc" "labelDigits" 'int 5)</code>
<code>envSetVal("auCore.misc" "labelDigits" 'int 5)</code>


Change the number 5 to your desired number of sig figs.
Change the number 5 to your desired number of sig figs.  To make this change permanent, add the line to your ~/.cdsenv file.
 
==Disable "What's New" Window==
You may not have noticed, but a simple graphical method has been included in icfb to disable the "What's New" window which pops up every time you start.  When the window opens, simply choose <b>Edit->Off at Startup</b> and you will never bothered by the windows again.
 
==Save operating point information over a DC sweep==
You may notice that DC operating point information (gm, gds, etc.) does not get saved over a DC sweep.  One way to work around this is to replicate the sweep using the parametric sweep tool.  In some cases, however, this may constrain your simulation setup.  If you simply want the op information to be saved for every point in a sweep, follow these directions:
*Make a new text file (saveop.scs, for example) in a directory to which you have read-write access.
*Add the following line to the file, replacing <code>N0</code> with the name of the device whos operating point you wish to save:
 
:<code>save N0:oppoint</code>
 
*Save the file.  Return to your ADE window, navigate to <b>Setup->Model Libraries</b>; now the file you just made to the list.
*Run your simulation and find the saved data in the Results Browser (under the Tools menu in the ADE).  You can also access the data with equations (i.e. <code>getData("M0:vdsat" ?result 'dc)</code>).
*You can, of course, have multiple lines in the file for multiple devices.  For large simulations, consider saving disk space by modifying the file to save only the parameters of interest (i.e, <code>N0:gm</code>).  More information about the save command can be found in the spectre documentation or by running <code>spectre -h save</code> at the terminal.
 
==Locked Files in Cadence==
If you try to open an old file and Cadence says you can't edit the file, it is because this file has become "locked." This usually happens as a result of Cadence crashing while the file was open.
 
To unlock the file, you need to search for and remove (using the rm command) a file that ends in ".cdslck". You will often have to look through directories and subdirectories to find this file, but look in directories that have the same name as the cellview in question. For example if you are having trouble opening the schematic in cellview "Inverter" in library "myLib" then you would go to the folder myLib/Inverter/ and look for all files ending in ".cdslck".
 
As an alternative to manually searching through the directories you can use the command (from the directory where you start cadence):
 
:<code>find . -name "*.cdslck"</code>
 
Before you run this command close all open schematics and layouts. Then simply remove all files that appear.
 
To remove all cdslck files, you can use the command rm together with searching(from the directory where you start cadence):
:<code>find . -name "*.cdslck" -exec rm -f {} \;</code>
Reference:
https://secure.engr.oregonstate.edu/wiki/ams/index.php/Cadence/TipsAndTricks#toc11
 
===Alternate Method: clsAdminTool===
 
From the directory you start Cadence, enter the following command:
 
:<code>clsAdminTool</code>
 
 
To list all edit locks within the current directory, enter:
 
:<code>ale .</code>
 
To release all edit locks within the current directory, enter:
 
:<code>are .</code>
 
 
To list/release edit locks in a specific directory, replace <code>.</code> with the path to the specific directory. For example:
 
:<code>are /ee330/lablib</code>
 
 
You can run these commands in the same line using a single hyphen. For example:
 
:<code>clsAdminTool -are .</code>
 
==Automatically Open the Library Manager==
In some Cadence environments, the library manager does not open automatically upone starting Cadence. In order to change this behavior you can simply add the line:
 
<code>ddsOpenLibManager()</code>
 
to your <code>.cdsinit</code> file.
 
=Other Tips and Tricks=
 
==Make Nautilus (file manager) behave like a browser==
Nautilus is the default file manager on the lab computers.  You have likely noticed that, with the default settings, it spawns a new windows each time you open a folder.  If you find this annoying, you can change its behavior with the following steps:
 
*Open the preferences dialogue (<b>Edit->Preferences</b>)
*Click on the <b>behavior</b> tab
*Tick the <i>always open in browser windows</i> option
 
==Firefox profile lock (error message with "Firefox is currently running...")==
Frequently, if you do not close firefox properly, it will give an error message next time you try to open it.  To fix this problem, navigate to <code>~/.mozilla/firefox</code> and look for a folder with a mix of numbers and letters followed by "Default User".  In this folder, you will find an invisible file called <code>.parentlock</code>; delete this file and the problem should be fixed.

Latest revision as of 23:24, 12 November 2023

Cadence Tips and Tricks

Change Waveform Graph windows default settings

Add some of the following lines to .cdsenv file to change the window size, background/foreground color, font size, line thickness,and etc.

;width
viva.graphFrame width string "900"
;height
viva.graphFrame height string "700"
;background color
viva.graphFrame background string "white"
;foreground color
viva.graphFrame foreground string "black"
;axis font
viva.axis font string "Fixed [Misc],14,-1,5,50,0,0,0,0,0"
;marker font
viva.pointMarker font string "Fixed [Misc],14,-1,5,50,0,0,0,0,0"
viva.horizMarker font string "Fixed [Misc],14,-1,5,50,0,0,0,0,0"
viva.vertMarker font string "Fixed [Misc],14,-1,5,50,0,0,0,0,0"
viva.multiDeltaMarker font string "Fixed [Misc],14,-1,5,50,0,0,0,0,0"
viva.refPointMarker font string "Fixed [Misc],14,-1,5,50,0,0,0,0,0"
;line thickness
viva.trace lineThickness string "thick"

You may also use envSetVal to set the environment. For example, to set the background to white, type the following in the CIW window.

envSetVal(“viva.graphFrame” “background” 'string “white”)

Set the default script/veriogA editor in Cadence to gedit

  • Option 1: type the following in CIW command line

editor="gedit"

  • Option 2: add the line to .cdsinit

editor="gedit"

Set # of sig figs on schematic annotation

Sometimes the number of significant figures on schematic annotations (node voltages, for example) is very high and it becomes difficult to read. To fix this, type the following into the icfb window:

envSetVal("auCore.misc" "labelDigits" 'int 5)

Change the number 5 to your desired number of sig figs. To make this change permanent, add the line to your ~/.cdsenv file.

Disable "What's New" Window

You may not have noticed, but a simple graphical method has been included in icfb to disable the "What's New" window which pops up every time you start. When the window opens, simply choose Edit->Off at Startup and you will never bothered by the windows again.

Save operating point information over a DC sweep

You may notice that DC operating point information (gm, gds, etc.) does not get saved over a DC sweep. One way to work around this is to replicate the sweep using the parametric sweep tool. In some cases, however, this may constrain your simulation setup. If you simply want the op information to be saved for every point in a sweep, follow these directions:

  • Make a new text file (saveop.scs, for example) in a directory to which you have read-write access.
  • Add the following line to the file, replacing N0 with the name of the device whos operating point you wish to save:
save N0:oppoint
  • Save the file. Return to your ADE window, navigate to Setup->Model Libraries; now the file you just made to the list.
  • Run your simulation and find the saved data in the Results Browser (under the Tools menu in the ADE). You can also access the data with equations (i.e. getData("M0:vdsat" ?result 'dc)).
  • You can, of course, have multiple lines in the file for multiple devices. For large simulations, consider saving disk space by modifying the file to save only the parameters of interest (i.e, N0:gm). More information about the save command can be found in the spectre documentation or by running spectre -h save at the terminal.

Locked Files in Cadence

If you try to open an old file and Cadence says you can't edit the file, it is because this file has become "locked." This usually happens as a result of Cadence crashing while the file was open.

To unlock the file, you need to search for and remove (using the rm command) a file that ends in ".cdslck". You will often have to look through directories and subdirectories to find this file, but look in directories that have the same name as the cellview in question. For example if you are having trouble opening the schematic in cellview "Inverter" in library "myLib" then you would go to the folder myLib/Inverter/ and look for all files ending in ".cdslck".

As an alternative to manually searching through the directories you can use the command (from the directory where you start cadence):

find . -name "*.cdslck"

Before you run this command close all open schematics and layouts. Then simply remove all files that appear.

To remove all cdslck files, you can use the command rm together with searching(from the directory where you start cadence):

find . -name "*.cdslck" -exec rm -f {} \;

Reference: https://secure.engr.oregonstate.edu/wiki/ams/index.php/Cadence/TipsAndTricks#toc11

Alternate Method: clsAdminTool

From the directory you start Cadence, enter the following command:

clsAdminTool


To list all edit locks within the current directory, enter:

ale .

To release all edit locks within the current directory, enter:

are .


To list/release edit locks in a specific directory, replace . with the path to the specific directory. For example:

are /ee330/lablib


You can run these commands in the same line using a single hyphen. For example:

clsAdminTool -are .

Automatically Open the Library Manager

In some Cadence environments, the library manager does not open automatically upone starting Cadence. In order to change this behavior you can simply add the line:

ddsOpenLibManager()

to your .cdsinit file.

Other Tips and Tricks

Make Nautilus (file manager) behave like a browser

Nautilus is the default file manager on the lab computers. You have likely noticed that, with the default settings, it spawns a new windows each time you open a folder. If you find this annoying, you can change its behavior with the following steps:

  • Open the preferences dialogue (Edit->Preferences)
  • Click on the behavior tab
  • Tick the always open in browser windows option

Firefox profile lock (error message with "Firefox is currently running...")

Frequently, if you do not close firefox properly, it will give an error message next time you try to open it. To fix this problem, navigate to ~/.mozilla/firefox and look for a folder with a mix of numbers and letters followed by "Default User". In this folder, you will find an invisible file called .parentlock; delete this file and the problem should be fixed.