Working with Cadence at BYU
Cadence can only execute on a spice machine in the CAEDM. To have an
account in CAEDM lab, you need to talk to the administers in Room 460.
- BYU CAEDM Specific
- Cadence Setup
- First, get admitted to the CAEDM masks group
- Copy this cadence folder onto your home directory.
- Open the zip file and copy the actual cadence file and paste it into your home directory. You can now delete the zipped file.
- Download cshrc_cadence
- Save this file in your cadence folder:
- Edit your .cshrc file
- In your home directory, type:
- gvim .cshrc
- Commment out all of the code (by placing pound sign in front of all lines)
- At the bottom, type:
- source ~/cadence/cshrc_cadence
- Cadence Library Creating
- Make sure you are in your cadence directory (otherwise your cadence files will save to whatever directory you're in).
- Start the Command Interpreter Window by typing:
- Find out more about the Command Interpreter Window (CIW)
- As the CIW pops up, a second window (Library Manager) will appear on the screen.
- Create the library that you will use for your designs, in the Library Manager
- Click File->New->Library
- The " New Library " form will appear
- For the Name enter something meaningful (the example
above has the library named summer_project). Make sure the directory box has
your cadence directory in it. Now hit OK. Then, a different form will pop
out, it is for selecting a technology file
- This is the file that contains all of the design rules for your project. You
can create your own Technology File by clicking on the radio button next to
Compile a new techfile, otherwise select Attach to an existing techfile or Don't
need a techfile, then hit Ok. But it is not recommended to write your own
Technology File, if you have never used " Skill " programming language
in Cadence. Selecting Attach to an existing techfile brings another box:
Click on the pulldown menu, there are several created technology
libraries. By selecting any one of these technology libraries, the
corresponding techfile will be attached to your new library. (Here, AM12
is suggested for layout editting)
- Running The Layout Editor
- Open Cadence in your cadence directory as usual.
- In either the CIW or the Library Manager, click File->New->Cellview.... Make sure that you are in
the library that you created and name the cell. Then type in layout for the View Name and press tab. When you press tab it should switch the Tool to Virtuoso, but if it doesn't just do it yourself.
- Click "OK". After a couple of seconds, two new windows should appear. One is your Layer Selection Window
in which you will select the layers that you wish to use.
The other window is your
(layout editing window)
in which you will design the layout for your cells.
- Layout Design Helps
- In the layout editing window, you should notice a large white cross that divides your screen into four quadrants. If this annoys you (like it does me) then press tab and then click in the upper right corner of your drawing field. This makes where ever you click become the center of the screen.
- Note that below the menu bar at the top of the screen there are X and Y coordinates. These are in microns. If you know the dimensions of your design, then these will make it easier to draw. Go to the Options-->Display... menu to pull up the
(Display Options Form)
Then, it is recommended to set all the options to default by clicking on the Default button unless you have specific requests of the display in the layout editing window.
- Example 1: Simple shapes
- Click on the entry layer you want in the LSW.
- Choose Create - Conics - Donut.
- Click where you want the center of the donut.
- Click where you want the inner edge of the donut.
- Click where you want the outer edge of the donut.
- Click on the entry layer you want in the LSW.
- Choose Create - Conics - Circle.
- Click where you want the center of the circle.
- Click where you want the edge of the circle.
- In the LSW, click on the entry layer you want.
- Choose Create - Conics - Ellipse.
- Click where you want the first corner of the rectangle.
- Click where you want the opposite corner of the rectangle.
- In the LSW, click on the layer you want.
- Choose Create - Polygon [Shift-p].
- In the Net Name field, type the net name you want the polygon to be associated with.
- If you want to create a ROD object polygon, turn on As ROD Object.
The ROD Name field becomes editable, allowing you to change the name from the default name that is displayed.
If you do not change the name, the default name is assigned to the polygon.
- Click to enter the first point.
- Move the cursor and click to enter the next point.
- Continue to move the cursor and click to enter points. As you enter each point, a dotted line shows how the layout
editor will close the polygon if you stop at that point.
- Double-click to finish the polygon.
- In the Layer Selection Window, click on the layer you want.
- Choose Create - Rectangle [r].
- In the Net Name field, type the net name you want the rectangle to be associated with.
- If you want to create a ROD object rectangle, turn on As ROD Object.
The ROD Name field becomes editable, allowing you to change the name from the default name that is displayed. If you do not change the name, the default name is assigned to the rectangle.
- Click to enter the first corner of the rectangle.
- Click to enter the opposite corner of the rectangle.
- Example 2: Using stretch or ruler
- Left click on a point of your choice to begin the rectangle.
- Move the mouse until you have reached the desired dimensions and then left click again to finish it.
Use the coordinates above to monitor distance.
- Make sure that nothing is selected and press "s" and hide the "Stretch" form. Stretch is going to become
your best friend. This command allows you to move a side of a rectangle in order to fix or change its dimensions.
As you move the mouse near a side of the active, notice how only a side will be highlighted. Left click on one of
the sides and note how it moves, then return it to its original position.
- You may click on the bottom left icon to bring up the ruler. To use it just left click on the start point and
then move the mouse to the desired end point. It will only measure vertically or horizontally if the display options
form is not set to the default. To get rid of the measurement, just press Ctrl-k it will remove all your
measurements at once.
- Example 3: Adding Paths
- First select a layer from the LSW. (i.e. Metal1)
- Now press "p" for "create path". Move the cursor over the layout and single left click. Notice that a path of the specified layer will follow the mouse around.
- After you have made a few clicks on your design, go back to the" add path" form and switch the "Change to Layer" pull down box to any other layer.
- Now move back to the layout window and notice that a big square follows your mouse. This is a contact between the two layers that you are dealing with. Place the contact by single left clicking, and then move the mouse. Now the new layer that you have selected can be routed.
- You can also use this path command to create a contact as you did in the last tutorial. Just select one of the layers you wish to be part of the contact and then press "p." Now change the layer to the other layer of the contact and place it. You don't even need to draw any nets if you do not wish to. If you don't need to draw a net and only want to create a contact, you can press "o" or select Create contact.... Just choose from the pull down box which layers you wish to contact.
- Example 4: Moving, Stretching, Reshaping, and Chopping.
- Moving is pretty simple. Type "m", click the move icon, or click Edit-->Move to move a shape. Cadence will then prompt you to choose the item you wish to move and then to move the item. You can also just click on an item and move it by dragging it as long as no other commands are running.
- I briefly touched on stretching in the last tutorial. Press "s" for stretch and then move the mouse over the different shapes. Hopefully you have already added some rectangles to mess around with. Notice the different parts of the shape that can be highlighted. You should be able to select the corner, a side, or the whole shape. If you select the whole shape, stretch will function like a move and the size of the shape will not be changed. Select different parts of the shape and become familiar with the stretch command.
- Reshaping is a command that you will find quite useful. The main idea behind this command is obvious from the name. You now have the ability to take a plain, ordinary, boring rectangle and make it whatever interesting polygon you want. Use the following steps to become more familiar with the reshape command.
- Make sure that you have a rectangle drawn to work on.
- Make sure that nothing is selected (ctrl d) and press "R" (shift r, case is important) or select Edit-->Reshape to initiate the Reshape command.
- You won't need to change anything in the Reshape form, so just click hide or move it out of your way.
- Your layout window will first prompt you to select the shape that you wish to modify. Do so by left clicking on a shape.
- It now asks for the first point of the reshape rectangle. Make a rectangle that starts on the lower left corner of your shape, and end it somewhere inside of your shape. You are going to cut out one of the corners of the rectangle.
- The layout window now prompts you to toggle the version of the modified shape to keep. You do this by right clicking. Notice as you right click, that a purple outline will change to include the rectangle you have drawn. Toggle it to look similar to this.
- When you have toggled yours to have the same purple outline as shown, left click to select it. Cadence should have chomped off the rectangle that you drew. Make a capture of this to turn in with your assignment.
- Notice that the command repeats. Make a rectangle that will restore the shape to its original form. Toggle so the purple outline goes out to the original corner and then left click. You should now have your original shape back.
- You can also use this command to extend your shape by drawing the rectangle from and edge of the shape out to unfilled area. The resulting shape could look like this.
- Mess around with this a little so that you are familiar with the command.
- Make an extension to a shape as shown above on a different side or different layer and capture it for your assignment.
- Chopping is similar to reshaping, but it can only be used to remove or chop off part of your shape. Reshaping must be used to add to your shape. Use the following steps to perform a chop.
- Make a rectangle to work with.
- Now select the rectangle and press "C" (shift c) or click Edit-->Other-->Chop.
- This command is simple, all you do is draw a rectangle around the part of the shape that you wish to get rid of. Chop off part of the rectangle.
- Now make a rectangle of BYU blue metal1 and create the "Y" in tribute to the Mighty Cougars!! It should look like this, except in blue.
- Instantiation and flipping or rotating
- To instantiate another file into the file you are working on.
- Click create->instance (or type i)
- A window should pop up that you can type in the names for the library, cell, and view for the file you want to instantiate. If you do not remember the name off hand you can use the browse button in thewindow it pulls up just click on the file you want then close the window.
- You can name the instance if you want. There are also options at the bottom for rotation of the instantiation.
- When done close the window. Then you should be able to click where you want the instance to go.
- How to show the instance file and not just the instance name
- Type e to pull up 'display options window'
- Under display controls near bottom there is an area for display levels. Change it so that it is from 0 to 10 or more depending on how many levels you have in your file.
- Push okay and close window.
- Flip instance.
- Click on the instance that you want flipped then type q to bring up the 'edit instance properties window'. Under attribute at the bottom of the window there is a Rotation pull down window. From the pull down window you can choose to Rotate (first letter R) or Mirror image (first letter M). Play around with these to see what they do.
- Making Alignment Marks
- For alignment marks you want them to be close to the size of the object you are making, however, you want to make sure that they show up.
- Here is an example of 3 alignment marks. The basic design is a square with a plus in it.
- Notice the design is repeated several times for each layer this is help make sure at least one alignment mark shows up to align to.
- First make this in a separate file then instantiate it into your final design. You will nead to instantiate twice.
- The picture shows a completed mask design and points to where the alignment marks go. The circle and square are for reference to see the size of the wafer and mask respectively.
- GDS Files Conversion
- In the CIW, choose the File->Export->Stream, a
- In the virtuoso window, click on the Library Browser button and select your layout file in the corresponding directory.
- Fill in the "Output File" blank with the directory path, and name the new gds file with extension ".gds".
- Click either OK button or Apply button. It takes a while to convert to the GDS file depending on the size of the layout file. Eventually, a
message window comes up with no error, if the conversion is successful.
- Helpful Shortkeys
- q change properties window
- e edit instance properties window
- c copy
- s expand
- m move
- ctrl-z zoom in
- shift-z zoom out
- esc drop command you were using
- f2 save
- k ruler
- shift-k clear all rulers
- r draw a rectangle
- shift-p draw polygon
- p draw path
- l label
- ^p pin
- o contact
- shift-r reshape
- u undo
- shift-u redo