Simulation with IRSIM
Cadence had some very nice simulation features (see the Worcester Polytechnic Institute tutorial for examples) but we do not have a working flow for them yet. For now we will
use the simulation flow we had last year with Magic (i.e. irsim and hspice from the extracted Magic version of the cell).
Moving a design from Cadence to Magic
To move a design from Cadence to Magic, go to File -> Export -> CIF... and
bring up the CIF export form. Type in your library name, the name of the top level cell
in your design, and layout for View Name. In the lower half of the form, type in the name you want to give to your CIF output file (something.cif).
Click OK to start the export. The export may take a few moments, but when it's over a message will pop up saying that it has completed and found soem number of errors
and warnings. You can look at the errors and warnings in the PIPO.LOG file in your cedence directory. In general, the warnings will be layers that were defined in the translation form (/usr/site/cadence/local/pipo/cifOutLayermap) but not in your design (e.g. metal4). THese warnings can be ignored.
Now that you have a cif file, start magic with the command
/usr/site/cad/bin/magic_subm -T SCN3ME_SUBM.30
(you probably want to register for cad-2.0 to run magic properly)
In the magic command window type :cif read your_file_name_without_.cif_extension
Now you will see your design in the window. There will probably be areas with lots of
white dots, denoting DRC errors. Here's a few commonly encountered problems.
Contacts not properly defined
Usually the NTAP and M1_P contacts we use in Cadence (and possibly some of the others)
do not import properly because they are defined with the active layer, which can be
pactive or nactive depending on design context. Magic has difficulty with this. Try
typing :drc count to check for these problems. If any of your contact cells have
errors, type :open contact_name to bring up the cell in a different window.
Now type s in that window until the contact is selected and type :edit to
make the cell editable. Now you can correct the cell. In M1_P, if the
contact is made from the layer psubstratecontact (select the contact by typing s
over it and type :what to bring up the layer name in the text window), delete it and replace it with
pdiffusioncontact, or pdc You do this by selecting it, typing :delete and typing :paint pdc. Be sure to put the new square of pdc in exactly the same space as the old one, otherwise your contacts will be offset in all of your cells. To fix the NTAP cell, you just need to make the nwell area around the cell larger. To do this open NTAP, make it editable, right then left click to make a square slightly larger than the nwell square but centered on the contact, and middle click on some nwell to make the square you painted fill with nwell.
There will probably be a few drc errors concerning metal overlap if you have many subcells.
Cadence is much better about realizing that if there's a metal square smaller than the minimum drc width next to a metal square belonging to another cell, the two together are sufficiently large not to cause a problem. Magic doesn't see this and will often complain about it. You can fix it if you'd like, but I'd recommend doing all of your changes in Cadence so that you do not have to import the design back into cadence from magic when you are done simulating it.
Differeing DRC rules
Cadence allows overlapping contacts but magic does not. Magic also used the deep rules for poly spacing (minimum 4 lambda) while Cadence uses the subm rules (minimum 3 lambda spacing). I believe we should be following the subm rules, so you can ignore drc errors (or if you want to be extra cautious, look up the proper rules for yourself on the mosis web site).
Before you can extract and simulate your design, you need to add labels that magic can understand. Magic likes labels in the same layer as the object it's labeling, while Cadence used text labels (which may not even be imported into magic). Be sure to go back and add point labels in Magic using the :label lable_name command. There must be some of the material you are labeling in the level of the cell you are editing for it to attach properly.
On a completely unrelated topic, when you make PLAs (use the platool_subm on a .meg file yo
u create) the output is a .mag file. Load this into magic and export it using
:cif ostyle lambda=0.30(c)
and then you can open it in cadence. One thing I recommend doing is running the
perl script called cif_corrections
(in the samples subdirectory of this tutorial) on the cif file before loading it
into cadence to change all of the labels into text labels. You can run this
program by making a local copy and typing
cif_corrections old_file.cif > new_file.cif
at the unix prompt.
This will not chage the old cif file, but will create a new, more cadence friendly version
In Magic, type :extract to extract the cells. Ocassionally there are drc error that
cause this to fail. If this is the case, go back and fix them and try again.
Creating a .sim file
To create a .sim file from the .ext file created from Magic, use the command
ext2sim -R -t! file_name.ext at the unix prompt and use
irsim scmos30.prm file_name.sim to start irsim. There are useful references elsewhere onwriting command files for irsim.