Docsity

Magic Tutorial #6: Design-Rule Checking in Magic - Continuous Error Detection, Study notes of Electrical and Electronics Engineering

Toggle sidebar
bg1
Magic Tutorial #6: Design-Rule Checking
John Ousterhout
Computer Science Division
Electrical Engineering and Computer Sciences
University of California
Berkeley, CA 94720
(Updated by others, too.)
This tutorial corresponds to Magic version 6.
Tutorials to read first:
Magic Tutorial #1: Getting Started
Magic Tutorial #2: Basic Painting and Selection
Magic Tutorial #4: Cell Hierarchies
Commands introduced in this tutorial:
:drc
Macro introduced in this tutorial:
y
1. Continuous Design-Rule Checking
When you are editing a layout with Magic, the system automatically checks design
rules on your behalf. Every time you paint or erase, and every time you move a cell or
change an array structure, Magic rechecks the area you changed to be sure you haven’t
violated any of the layout rules. If you do violate rules, Magic will display little white
dots in the vicinity of the violation. This error paint will stay around until you fix the
problem; when the violation is corrected, the error paint will go away automatically.
Error paint is written to disk with your cells and will re-appear the next time the cell is
read in. There is no way to get rid of it except to fix the violation.
Continuous design-rule checking means that you always have an up-to-date picture
of design-rule errors in your layout. There is never any need to run a massive check over
the whole design unless you change your design rules. When you make small changes to
an existing layout, you will find out immediately if you’ve introduced errors, without
-1-
pf3
pf4
pf5

Partial preview of the text

Download Magic Tutorial #6: Design-Rule Checking in Magic - Continuous Error Detection and more Study notes Electrical and Electronics Engineering in PDF only on Docsity!

Magic Tutorial #6: Design-Rule Checking

John Ousterhout

Computer Science Division Electrical Engineering and Computer Sciences University of California Berkeley, CA 94720

(Updated by others, too.)

This tutorial corresponds to Magic version 6.

Tutorials to read first:

Magic Tutorial #1: Getting Started Magic Tutorial #2: Basic Painting and Selection Magic Tutorial #4: Cell Hierarchies

Commands introduced in this tutorial:

:drc

Macro introduced in this tutorial:

y

1. Continuous Design-Rule Checking

When you are editing a layout with Magic, the system automatically checks design rules on your behalf. Every time you paint or erase, and every time you move a cell or change an array structure, Magic rechecks the area you changed to be sure you haven’t violated any of the layout rules. If you do violate rules, Magic will display little white dots in the vicinity of the violation. This error paint will stay around until you fix the problem; when the violation is corrected, the error paint will go away automatically. Error paint is written to disk with your cells and will re-appear the next time the cell is read in. There is no way to get rid of it except to fix the violation.

Continuous design-rule checking means that you always have an up-to-date picture of design-rule errors in your layout. There is never any need to run a massive check over the whole design unless you change your design rules. When you make small changes to an existing layout, you will find out immediately if you’ve introduced errors, without

having to completely recheck the entire layout.

To see how the checker works, run Magic on the cell tut6a. This cell contains several areas of metal (blue), some of which are too close to each other or too narrow. Try painting and erasing metal to make the error paint go away and re-appear again.

2. Getting Information about Errors

In many cases, the reason for a design-rule violation will be obvious to you as soon as you see the error paint. However, Magic provides several commands for you to use to find violations and figure what’s wrong in case it isn’t obvious. All of the design-rule checking commands have the form

:drc option

where option selects one of several commands understood by the design-rule checker. If you’re not sure why error paint has suddenly appeared, place the box around the error paint and invoke the command

:drc why

This command will recheck the area underneath the box, and print out the reasons for any violations that were found. You can also use the macro y to do the same thing. Try this on some of the errors in tut6a. It’s a good idea to place the box right around the area of the error paint: :drc why rechecks the entire area under the box, so it may take a long time if the box is very large.

If you’re working in a large cell, it may be hard to see the error paint. To help locate the errors, select a cell and then use the command

:drc find [ nth ]

If you don’t provide the nth argument, the command will place the box around one of the errors in the selected cell, and print out the reason for the error, just as if you had typed :drc why. If you invoke the command repeatedly, it will step through all of the errors in the selected cell. (remember, the ‘‘.’’ macro can be used to repeat the last long command; this will save you from having to retype :drc find over and over again). Try this out on the errors in tut6a. If you type a number for nth , the command will go to the nth error in the selected cell, instead of the next one. If you invoke this command with no cell selected, it searches the edit cell.

A third drc command is provided to give you summary information about errors in hierarchical designs. The command is

:drc count

This command will search every cell (visible or not) that lies underneath the box to see if any have errors in them. For each cell with errors, :drc count will print out a count of the number of error areas.

area of a cell may also appear in the cell’s parent. Fixing the error in the subcell will cause the error in the parent to go away also.

4. Turning the Checker Off

We hope that in most cases the checker will run so quickly and quietly that you hardly know it’s there. However, there will probably be some situations where the checker is irksome. This section describes several ways to keep the checker out of your hair.

If you’re working on a cell with lots of design-rule violations the constant redisplay caused by design-rule checking may get in your way more than it helps. This is particu- larly true if you’re in the middle of a large series of changes and don’t care about design-rule violations until the changes are finished. You can stop the redisplay using the command

:see no errors

After this command is typed, design-rule errors will no longer be displayed on the screen. The design-rule checker will continue to run and will store error information internally, but it won’t bother you by displaying it on the screen. When you’re ready to see errors again, type

:see errors

There can also be times when it’s not the redisplay that’s bothersome, but the amount of CPU time the checker takes to recheck what you’ve changed. For example, if a large subcell is moved to overlap another large subcell, the entire overlap area will have to be rechecked, and this could take several minutes. If the prompt on the text screen is a ‘‘]’’ character, it means that the command has completed but the checker hasn’t caught up yet. You can invoke new commands while the checker is running, and the checker will suspend itself long enough to process the new commands.

If the checker takes too long to interrupt itself and respond to your commands, you have several options. First, you can hit the interrupt key (often ˆC) on the keyboard. This will stop the checker immediately and wait for your next command. As soon as you issue a command or push a mouse button, the checker will start up again. To turn the checker off altogether, type the command

:drc off

From this point on, the checker will not run. Magic will record the areas that need rechecking but won’t do the rechecks. If you save your file and quit Magic, the informa- tion about areas to recheck will be saved on disk. The next time you read in the cell, Magic will recheck those areas, unless you’ve still got the checker turned off. There is nothing you can do to make Magic forget about areas to recheck; :drc off merely post- pones the recheck operation to a later time.

Once you’ve turned the checker off, you have two ways to make sure everything has been rechecked. The first is to type the command

:drc catchup

This command will run the checker and wait until everything has been rechecked and errors are completely up to date. When the command completes, the checker will still be enabled or disabled just as it was before the command. If you get tired of waiting for :drc catchup , you can always hit the interrupt key to abort the command; the recheck areas will be remembered for later. To turn the checker back on permanently, invoke the command

:drc on

5. Porting Layouts from Other Systems

You should not need to read this section if you’ve created your layout from scratch using Magic or have read it from CIF using Magic’s CIF or Calma reader. However, if you are bringing into Magic a layout that was created using a different editor or an old version of Magic that didn’t have continuous checking, read on. You may also need to read this section if you’ve changed the design rules in the technology file.

In order to find out about errors in a design that wasn’t created with Magic, you must force Magic to recheck everything in the design. Once this global recheck has been done, Magic will use its continuous checker to deal with any changes you make to the design; you should only need to do the global recheck once. To make the global recheck, load your design, place the box around the entire design, and type

:drc check

This will cause Magic to act as if the entire area under the box had just been modified: it will recheck that entire area. Furthermore, it will work its way down through the hierar- chy; for every subcell found underneath the box, it will recheck that subcell over the area of the box.

If you get nervous that a design-rule violation might somehow have been missed, you can use :drc check to force any area to be rechecked at any time, even for cells that were created with Magic. However, this should never be necessary unless you’ve changed the design rules. If the number of errors in the layout ever changes because of a :drc check , it is a bug in Magic and you should notify us immediately.