**************************************************************************
Using the editor and LSW
********************************************************************************

Using the Library Browser, select the cell labeled "scratch"
from the library tutorial. Click the middle button on the 
mouse on the most recent version. When the dropdown menu 
appears, select edit.

The following should appear on your screen:

FIGURE 5 Scratch Cell




This cell is a scratch file--one that you can modify and 
save under a different name.  Technically you are supposed 
to go through the trouble of "creating a new cell"  but 
if you save a scatch cell under a different name, this
automatically takes care of the initializations required.

*******************************************************************************
Creating Shapes
*******************************************************************************

At this point, we will briefly turn our attention to the 
Layer and Selection Window (LSW). The LSW (figure 6) 
contains several layers which you will use in fabrication 
of devices.  Each layer has a distinct color and pattern so 
that it will stand out against multiple layers.

FIGURE 6    Layer and Selection Window (LSW)



First select "nwell dg" by clicking the left button on that 
block.  Nwell is now outlined in black indicating that it 
has been selected.  In the editing window, select Create
--Rectangle.  Click the left button, and drag the mouse 
across the screen.  As you do so, the outline of a 
rectangle will appear.

When you are satisfied with the size of the rectangle, click 
on the left button again.  The shape appears shaded in with an 
nwell pattern.  To simulate building a device, we will add a few 
addtional rectangles of different materials.  

Select oxide1 from the menu (if this not available, choose 
vapox). Place two rectangles of the new layer over top of the 
nwell.  Note that this particular layer overshadows all but 
the outline of the nwell.  This is because each layer is 
given a certain "priority" in a file called a techfile (.tf).  
The higher the priority a layer is, the less its image is 
obstructed by covering layers.  

If you are creating a mask set for a device such as the circuit 
you will be  testing this semester, you need to isolate the 
various layers.  The first mask would be the nwell region. While 
holding the shift key, press the middle button on the mouse.  
This will  cause all layers with the exception of the nwell to
be invisible.  To verify this, move the mouse to the editing 
window, and type ctl-r.  This 'redraws' the screen so that  the
only  visible layer is the nwell region.  Click on the box marked 
AV (all visible) and again type ctl-r.  Once again everything is
 visible.

To stop the mouse from drawing rectangles, type esc.

If you are not sure what the layer in the editing window is, 
press t (tap a layer).   Click on that layer with the mouse. This 
layer becomes the active in the LSW.


Now we will play around with the various shapes available to us. 
All may be found under the create library:

rectangle
polygon
path
contact
pin
conics--circle
        elipse
        donut 

Select the polygon. In the editing window, click on the left 
button. A yellow line follows the pointer.  Click the left 
button again. This forces the first corner of the polygon.  
Now a line starting at the first corner follows the mouse.  
Repeat this process until  you are satisfied with the
shape.  Double click the left button, and a polygon will 
appear.

Now try to design a path.  Click with the left button at the 
starting point. At the first corner of the path click the left
button again.   Repeat this process until the desired path is 
present.  Then double click the mouse. A path a appears.

Select contact.  A square follows the mouse around.  Also, 
a form pops up. For the contact type, select M2_M1 (metal 2 
to metal 1). Move the box to the end of one of the path you
 drew, and click the mouse.  Now, switch your material to 
metal2. Pick  path again.  Starting from the center of the 
contact, draw a path. You will most likely get an warning 
that the starting or ending point was less than half the 
path size.  Click on OK.  The path then appeas.

For now, we are not going to look at creating pins.  Instead, 
we turn our attention to conics.  On older programs such as 
magic, the user was forced to approximate a circle by making 
a series of tiny jagged corners.  This program allows you to 
draw true circles.    Select conics--circle. Click with the left
button to specify the center of the circle.  Then drag the mouse 
to the edge, and click again.

Our next shape is the ellipse.  Recall from elementary trigonomety 
that the ellipse is defined by the major and minor focii.  
Here, the shape is defined by indicating the opposite corners of 
the rectangle they form. An elipse will then appear.

Similarly, the program will let you create a donut shape.

*****************************************************************************
Modifying Shapes
*****************************************************************************

Now, we would like to modify some of the shapes we have 
previously drawn. Suppose that the shape is off by a micron.  
Rather than redraw the entire shape, Cadence will allow you
to simply "stretch" the edge of a shape. To do so, select 
edit--Stretch.  Drag the mouse across the shape edge of
the shape.  Here, we would like only to stretch the top. 
As the mouse is  moved, the shape is outline in dashed lines.  
When they are only at the top (as in figure 7), click on the 
mouse.  The yellow lines become a solid white line.  Move the 
mouse up and down.  The outline of the box follows the
cursor.  Experiment, and extend it up a few microns.   
When you are satisfied with the size, click the left button.
The shape should now be enlarged and filled in with the 
appropriate layer.

FIGURE 7



For some applications such as alignment marks on a 
mask set, we may need to delete the middle of a particular 
shape.  Click on Edit--Other->--Chop. Click on the 
shape you want to chop. It is now outline.  Move the mouse
to a corner of the interior rectangle.  Click the 
button.  Drag the mouse  until the outline corresponds
to the size of the inner rectangle. Click the mouse again.  
The middle disappears (fig 8).

FIGURE 8



There are several other features under edit--other.  If 
you need to select everything in the layout, choose  
"edit--other->Select All". If you need to change the 
orientation of a shape, select "edit--other->rotate".
Listed below is a list of feature under the edit other 
category:

Cut
Merge
Make Cell
Flatten
Modify Corner
Size
Split
Attatch
Convert to Polygon
Select All
Deselect All
Rotate

As with the entire Cadence package, all of the above 
files contain links to online help files.  They generally 
use a very similar approach to accomplish different tasks, 
but should you get stuck, click on help. This should 
answer any remaining questions.

****************************************************************************
The ruler
****************************************************************************

The easiest way to judge the size of your shape is to 
use the "ruler".  Click on Misc--Ruler.  Pick an edge 
or separation distance you would like to measure, and 
click the left button on that spot.  As you drag the 
mouse, the outline of a ruler will follow you.  When 
the ruler is covering the spacing you wanted to measure, 
click on the mouse again.  The ruler now appears in grey.  
If you move to another point, and click the left button 
a second ruler will be generated.  To terminate
the ruler function,  hit esc.  The placed rulers will
still remain. To get rid of them either type "K" or 
select Misc--Clear Rulers.

Additional Help Files