Table of Contents

Tips and Tricks

MATLAB Tricks

Matlab6 doesn't seem to start properly in the debain installed machines. The entire GUI doesn't work properly. But the command prompt, help, plots, matlab code editor work perfectly. The way to start matlab6 (for those machines alone) is to type the second command as /cad/tools/matlab6p1/bin/matlab -nodesktop

Keeping your designs accessible to others, but other files private

You can manually do chmod, but that's a pain. At the beginning of your .cshrc, put the line umask 077. This will create files with permissions only to the user. To have files generated from, say, Cadence have read permissions for others, invoke it from inside a shell script with umask 022. See the example myicms below.

#!/bin/csh
# 
# Create files with read permissions for others

umask 022
icms &

CADENCE Tricks

Report caps in sorted order on a particular net
 
Usage: ./caprep [-n net_name] [-c net_name1 net_name2] [-b net_name1 net_name2] [-f file] [-h]
 
 -n : Net name
 -c : Compare parasitics on 2 nets
 -b : Report parasitics between 2 nets
 -f : Input netlist file
 -h : Help
 
example1: ./caprep -n vip -f input.scs
example2: ./caprep -c vip vim -f input.scs
example3: ./caprep -b vip gnda -f input.scs

CADENCE Bugs

SPECTRE Tricks

Save and Plot ''oppoint'' of Spectre Transient Simulation

If you are interested in seeing various operating point values of devices plotted against time for a Spectre transient simulation, use following method (taken from SourceLink Solution No. 11003524) -

save osc.Q1:oppoint

SPECTRE bugs

PSS + PAC Analysis in Circuits Using Inductors

PXF / PSS Analysis

XCircuit Tricks

  1. Exporting any Matlab curve as a library object into Xcircuit
    • xcircuit.m is the file which dumps out the library object corresponding to the matlab curve.
    • test.m is an example where a sine wave is created for xcircuit.
    • In Xcircuit, use “File > Load New Library” to load the sine wave object dumped out in 'test.lps' by m/Calibre/LVS/G-DF-LOGIC_MIXED_MODE90N-1P9M-LOW_K_CALIBRE-LVS-1.1-P20.txt

Blackbox LVS

Blackbox LVS is useful for synthesized layouts (which don't have a transistor level schematic) or nonstandard components like inductors, varactors which are not from the PDK. The cell to be treated as a blackbox in LVS should have the correct pins(with pins M*_CAD TT in layout). It should have a dummy schematic with some component like a resistor or MOS inside connected to a pin. It doesn’t matter what it is or where it is connected to. In LVS options, specify the cells to be treated as blackboxes as shown below. Multiple cells can be specified on the same LVS BOX line or separate lines.

Insert picture =“/dokuwiki/_detail/cadtools/blackboxlvs.png?id=cadtools%3Acalibre&amp;cache=cache” class=“media” title=“cadtools:blackboxlvs.png”><img src=“/dokuwiki/_media/cadtools/blackboxlvs.png

If the layout has more pins than the schematic, the LVS result will have only pin mismatch error. You can manually check for this and see that there are no other errors. Alternatively, you can remove the extra pins in the layout. This can happen with synthesized cells which have a huge number of pins inside. These can be selected together and converted to text layer. Only the pins on the periphery, which are the actual connections to the outside, can be retained. This process only checks for connections to the pins. What you have inside the cell is up to you. If you have metal line running over the cell which shorts out the insides, this method won&rsquo;t check it.

Extraction

<li class=“level1”><div class=“li”> Use

your_working_directory/pex

for PEX. </div> </li> <li class=“level1”><div class=“li”> Make a softlink to

/cad/library/UMCxxx/RuleDecks/Calibre/calview.cellmap

in your working directory</div> </li> <li class=“level1”><div class=“li”> Cancel the

runset

prompt the first time you use the tool</div> </li> <li class=“level1”><div class=“li”> Use

your_working_directory/pex

for PEX. </div> </li> <li class=“level1”><div class=“li”> Once you setup the rules file etc. you can store them as

pex.rules

runset file in your pex directory. This runset file can be loaded each time to give you the desired setup. </div> </li> <li class=“level1”><div class=“li”> Choose <strong>Export from Layout viewer</strong> and <strong>Export from Schematic viewer</strong> for layout and netlist inputs</div> </li> <li class=“level1”><div class=“li”> Choose

Setup&rarr;Show PEX options

</div> </li> <li class=“level1”><div class=“li”> Enter appropriate power and ground nodes in

LVS options&rarr;Supply

. Name connections etc. can also be specified here.</div> </li> <li class=“level1”><div class=“li”> In

Outputs

, choose

CALIBREVIEW

for extracted view(similar to av_extracted) or

SPECTRE

to get only a netlist in spectre format.</div> </li> <li class=“level1”><div class=“li”> Your

Calibre View Setup

form should look as follows</div> </li> </ul>

<p>

<a href="/dokuwiki/_detail/cadtools/calibrepex.png?id=cadtools%3Acalibre&amp;cache=cache" class="media" title="cadtools:calibrepex.png"><img src="/dokuwiki/_media/cadtools/calibrepex.png?w=400&amp;h=&amp;cache=cache" class="media" alt="" width="400" /></a>

</p> <ul> <li class=“level1”><div class=“li”> Parasitics can be viewed from <strong>RVE</strong>. Use

View&rarr;Net parasitics

. </div> </li> </ul>

</div> <!– SECTION [5685-6733] –> <h3><a name=“rules_files_same_as_for_lvs” id=“rules_files_same_as_for_lvs”>Rules files(same as for LVS)</a></h3> <div class=“level3”> <ul> <li class=“level1”><div class=“li”> 180nm:

/cad/library/UMC180/RuleDecks/Calibre/LVS/G-DF-MIXED_MODE_RFCMOS18-1.8V_3.3V-1P6M-MMC_CALIBRE-LVS-2.0-P2.txt

</div> </li> <li class=“level1”><div class=“li”> 130nm:

/cad/library/UMC130/RuleDecks/Calibre/LVS/G-DF-MIXED_MODE_RFCMOS13-1P8M-MMC-FSG-L130E-CALIBRE-LVS-2.3-P2.txt

</div> </li> <li class=“level1”><div class=“li”> 90nm: (Both options below are available on different miniasic runs)</div> <ul> <li class=“level2”><div class=“li”> RF(3um thick top metal):

/cad/library/UMC90/RuleDecks/Calibre/LVS/G-DF-LOGIC_MIXED_MODE90N-1P9M-LOW_K_CALIBRE-LVS-1.1-P20.txt

(<em>Right now, the setup is the same as for 0.8um top metal; LVS should be correct; Top metal parasitics would be wrong. Calibre PEX gives errors with 3um metal specific file</em>)</div> </li> <li class=“level2”><div class=“li”> Logic(0.8um thick top metal):

/cad/library/UMC90/RuleDecks/Calibre/LVS/G-DF-LOGIC_MIXED_MODE90N-1P9M-LOW_K_CALIBRE-LVS-1.1-P20.txt

</div> </li> </ul> </li> </ul>

</div> <!– SECTI

<li For LVS run in process offering multiple metal options (like UMC65,UMC90), the metal option needs to be set to appropriate one as allowed by latest miniasic offering. One issue observed due to not doing this is that the MIMCAP was not extracted properly in layout netlist and LVS fails. To set the metal option, uncomment the appropriate ”#DEFINE“ line in LVS rule file. For 65nm following was the line :

#DEFINE TOP_METAL_ME9_1T1F1U // To switch LVS to 1P9M1T1F1U

Also uncomment the already existing ”#DEFINE“ line (that sets metal option to different metal option)</li>

Printer tricks

Printing Multiple Pages Per Sheet

You can easily print multiple pages per sheet of paper. To do this, you must have a Postscript (PS) file of what you want to print or generate postscript from a command and send it to a pipe. The command to use to print multiple pages per sheet is psnup. There are many options, so you should read the manual page (man psnup) for more information. The psnup command acts as a filter, meaning it takes a PS file as input and sends a new PS file to its output. To print this output file you can send it to a file using something like:

# psnup -4 input.ps > output.ps

and then print the output.ps file using an appropriate lpr command. However, if you have no interest in retaining the output PS file, just use a pipe like this:

# psnup -4 input.ps | lpr

Eldo tricks

One can use extract.pl to extract the data from chi file to plot using some other plotter (like gnuplot/matlab).Store this file as an executable. Run this program with the name of the chi file(e.g filter.chi) as the argument. The variable name with V or I prefixing it, (depending on if its a voltage or a current plot), will be the name of the outputfile with .dat as extension.

# ./extract.pl filter.chi

Using VNC viewer

Using VNC gives you the ability to connect back to the session that you were running. It also survives broken connections etc. as long as the server is running properly.

The following steps must be followed: Although it is possible to directly connect to the server using vncviewer, it is recommended to use ssh tunnel as it is more secure, and can be faster because of compression.

  1. Log on to the computer of your choice (say ti1) using $> ssh username@ti1
  2. Start vncserver by using $> vncserver -depth 24 -geometry 1024×768 [You need a depth of 24 for Cadence. Use the right geometry to suit your (client) screen size]
  3. It'll say something like New 'vega.ee.iitm.ac.in:2 (nagendra)' desktop is vega.ee.iitm.ac.in:2 Note the number after the colon, in this case 02, hereafter referred to as xx. This corresponds to port 59xx of the machine
  4. From your local machine, do ssh -C -L 59yy:localhost:59xx username@ti1 [yy is arbitrary, but to avoid conflicts, use yy=xx+50] This creates an encrypted tunnel between port 59yy of the client machine and port 59xx of the server. -C option compresses the traffic.
  5. From your local machine, connect to port 59yy of the local machine. using $> vncviewer localhost:yy or $> vncviewer localhost:59yy
  6. Go back to ti1, and issue $> vncserver -kill :xx
  7. A directory called .vnc will be created in your /home/username folder
  8. To set gnome session as default, open the file /home/username/.vnc/xstartup and do the following changes -
  9. Delete twm & and replace it with exec gnome-session &; For kde replace twm & with startkde
  10. Repeat steps 1,2 to restart the vnc server
  11. Repeat steps 3,4,5 to reconnect to the vnc server
  12. After finishing your session, close the exported display using F8 key.
  13. You can get back to this session as you left it using steps 3,4,5 from any machine. Open an ssh tunnel between port 59yy of your machine and 59xx of the server and connect vncviewer to localhost:59yy
  14. If you are done with the VNC session, terminate your session on ti1 by logging onto ti1 and using step 6. Don't do this if something is running on the vncserver and you want to access the results later

Grey screen problem in VNC If you find the grey screen in your vnc session, change your xstartup file located in .vnc folder. Uncomment “unset SESSION_MANAGER” and change “exec gnome-session &” to “gnome-session”.

Generating a pdf document with all fonts embedded in it

If the fonts are not embedded in the file, the pdf looks different, sometimes drastically so, in different readers. Whenever you make documents for distribution: paper submission, theses, reports, you should embed all fonts so that there are no readability issues. To check whether they are embedded, open the pdf in Adobe Acroread, go to File→Properties and open the fonts tab. All fonts should be marked as embedded (subset). Since we write in latex, you need to convert from ps to pdf with all fonts embedded.

gs -dSAFER -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sPAPERSIZE=a4 -dPDFSETTINGS=/printer -dCompatibilityLevel=1.4 -dMaxSubsetPct=100 -dSubsetFonts=true -dEmbedAll Fonts=true -sOutputFile=filename.pdf filename.ps

To do: Figure out the option to put in kile for doing the above