max tutorial

advertisement
MAX Layout System
Tutorial
Micro Magic Tools
Version 4.2
Juniper Networks, Inc.
1194 North Mathilda Avenue
Sunnyvale, CA 94089
USA
408-745-2000
www.micromagic.com
Part Number: MAX4.2, Revision 1
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
ii
Copyright 1996-2001 Juniper Networks, Inc.
This document contains confidential proprietary information which is not to be disclosed to unauthorized persons without the prior written consent of
Juniper Networks, Inc. You may use this document only for your internal business purposes. You may not distribute this document, whether in electronic or
printed form, outside your facilities specified in your license agreement. You may not modify the document.
While every attempt has been made to keep the information in this document as accurate and current as possible, Juniper Networks makes no warranty,
expressed or implied, with regard to the information contained herein, including, but not limited to, the implied warranties of merchantability and fitness
for any particular application. Juniper Networks further assumes no responsibility for any errors that may appear within this document or for any damages,
direct or indirect, that may result from using this document.
Trademarks
All other trademarks are the exclusive property of their respective holders and should be treated as such.
Table
of Contents
About this Document
Objectives .............................................................................................................. 3
Audience - MAX ..................................................................................................... 3
Organization .......................................................................................................... 3
Chapter Organization............................................................................................. 4
Documentation Conventions.................................................................................. 4
General Conventions....................................................................................... 4
Conventions for Software Commands and Statements ................................... 4
Conventions for Mousing ................................................................................ 5
Documentation Feedback ...................................................................................... 5
Support .................................................................................................................. 5
Getting set up......................................................................................................... 5
Part
1
Introduction
MAX Features ........................................................................................................ 1
Starting up MAX..................................................................................................... 2
MAX Screen Layout................................................................................................ 3
Cell List Boxes................................................................................................. 4
Navigation window ......................................................................................... 5
Scroll and Zoom bars............................................................................... 5
Mouse Coordinates and Box Size Location............................................... 6
DRC Control and Status ........................................................................... 6
The Palette...................................................................................................... 6
Layers............................................................................................................. 6
Getting Help.................................................................................................... 6
Tear Off Menus............................................................................................... 8
Part
2
Simple Layout
Using Gcells .................................................................................................. 11
Zooming ....................................................................................................... 13
Selecting and Moving Layout ........................................................................ 14
Duplicating gcells.......................................................................................... 15
Stretching gcells............................................................................................ 16
Aligning objects ............................................................................................ 17
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
iii
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
iv
Continuous DRC ............................................................................................17
Wiring Mode..................................................................................................20
Editing a Placed Wire .............................................................................21
Adding the Power Rails..................................................................................24
The Box .........................................................................................................25
Box Mode ...............................................................................................26
The Palette ....................................................................................................26
Painting the Power Rails................................................................................27
Wiring Mode - Changing Layers .....................................................................30
Erasing Layers ...............................................................................................33
Text ...............................................................................................................37
Selecting Nets ................................................................................................40
Advanced Selecting, Duplicating, And Renaming...........................................42
Part
3
Bigger Designs and Hierarchy
Show/Hide Internals ......................................................................................47
Push, Pop, and Edit in Place ..........................................................................47
Part
4
MAX-LS
MAX-LS Features...................................................................................................51
Automatic Layout Generation and Fly-lines...........................................................51
Cross-Probing with SUE .................................................................................56
Advanced Features ...............................................................................................58
To Learn More About MAX and SUE .....................................................................58
Micro Magic Tools MCC Tutorial Version 2.1
About this Document
This chapter provides an overview of the Micro Magic Tools MAX Layout Edit or Tutorial:
■ Objectives on this page.
■ Getting set up on page 5.
Objectives
This tutorial is a intended to be a step-by-step introductory training in the use of the Micro
Magic Tools (TM) MAX Layout Editor. By following the steps in this tutorial, you will learn how
to run MAX, and how to use MAX to optimize your designs. Once you are familiar with MAX,
refer to the Micro Magic Tools MAX User Guide for more detailed information about the tool
and its options.
Audience - MAX
This document is designed for chip designers and layout designers. It assumes that you have
a strong foundation in IC design and development, and layout editing. This document also
assumes that you are familiar with the following programming languages and operating
systems:Tcl/Tk, and UNIX or Linux.
Organization
This tutorial is divided into parts. Each part leads you through a different aspect of the Micro
Magic Tools MAX Layout Editor.
This document contains the following parts:
■ Preface, “About This Document” (this chapter), provides a brief description of the
content and organization of this document.
■ Part 1, “Introduction”, gives a brief overview of what you can accomplish using MAX,
and the requirements necessary for running the program.
■ Part 2, “Simple Layout”, provides instructions on using the basics of MAX to draw
layouts utilizing paint and wires. In addition, this section provides details about the MAX
window and user environment.
■ Part 3, “Bigger Designs And Hierarchy”, builds on the fundamental procedures from the
preceeding sections, and illustrates how to use MAX for very large layouts.
About this Document
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
3
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
4
■ Part 4, “MAX-LS”, introduces interactive cross-probing with SUE, including automatic
layout generation from schematics, and flylines.
Chapter Organization
Each part contains descriptions of the commands and methodology necessary to create
layout using MAX, with step-by-step, illustrative examples describing the usage of commands
and procedures.
Documentation Conventions
General Conventions
This guide uses the following text conventions:
■ Statements, commands, command output, filenames, directory names, and
configurations are shown in a boldface, fixed-width font. The following example shows a
full path name:
~/mmi_private/max/.maxrc
■ In examples, text that you type literally is shown in bold. In the following example, you
type the word max :
To launch max, type max
■ Menus, menu options, and pop-up menus are generally shown in a boldface, sans serif
font. For example:
Select Save As from the File Menu.
Conventions for Software Commands and Statements
When describing the Micro Magic Tools (TM) software, this guide uses the following type and
presentation conventions:
■ Statement or command names that you type literally are shown nonitalicized. In the
following example, the statement name is set MC(default_generator):
set MC(default_generator) sram
■ Variables for which you substitute appropriate values, are shown in itallics. Optional
commands within a string of code are often enclosed within square brackets ([ ]).
Variables are enclosed within angle brackets (<>). When you type the setMACRO
statement, you substitute a value for name, row1 and row2. CELL is an optional
command.
set MACRO(<name>){[CELL]<row1><row2>...}
Micro Magic Tools MAX Tutorial
Conventions for Mousing
Throughout this document, we assume you are using a 3-button mouse. When we refer to
using the mouse, the following settings apply:
■ Mouse-Button-1, or Button-1, refers to the left-most button (index finger) when you are
using a right-handed mouse.
■ Mouse-Button-2, or Button-2, refers to the middle, or center button (middle finger).
■ Mouse-Button-3, or Button-3, refers to the right-most button (ring finger) when using a
right-handed mouse.
Reverse these settings if you are using a left-handed mouse, using your mouse control
program, so that you click Button-1 with your index finger, Button-2 with your middle
finger, and Button-3 with your ring finger.
■ “Click” means to depress the designated mouse button once.
■ “Double-click” means to depress the designated mouse button twice, quickly.
■ “Drag” means to depress and hold down the designated mouse button while moving the
mouse.
Documentation Feedback
We are always interested in hearing from our users. Please let us know what you like and do
not like about the Micro Magic Tools documentation, and let us know of any suggestions you
have for improving the documentation. If you find any mistakes or out of date information,
please send email to support@micromagic.com
Support
For product problems or technical support issues, contact Micro Magic Tools at
support@micromagic.com.
Getting set up
MAX runs independently from any of the Micro Magic Tools suite.
First, ensure that the Micro Magic Tools software has been installed, and that you have a valid
MAX License.
To run some parts of the tutorial you will need to have a MAX-LS license. If you do not have
MAX-LS, simply skip that section.
About this Document
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
5
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
6
Micro Magic Tools MAX Tutorial
Part
1
Introduction
Welcome to MAX, the full-custom layout editor from Micro Magic Tools. MAX is
more than just a simple layout editor. It is a complete layout environment.
MAX Features
■ Interactive viewing and editing of hierarchical layout
■ Continuous DRC feedback during layout
■ Hierarchical and incremental DRC
■ Built in netlisting
■ Interactive connectivity tracing
■ Interactive wiring tool with flylines to show connections not yet completed
■ Layout generator for gates (using MAX-LS)
■ Generators for large regular structures such as SRAMS, ROMs, PLA's, and
DRAM's (with the optional MegaCell Compiler)
■ Interfaces to other tools, including schematic capture (for example SUE),
and batch DRC and LVS (for example Dracula or Calibre).
■ Smart palette for easy control and feedback on layers
■ Full customization and extension via Tcl/Tk scripting language and API
■ Technology independence via technology description files
■ Optimized for large databases
■ Very Fast Redisplay for Whole Chip Viewing and Inspection
■ Reads/writes GDSII
■ Runs on Solaris and Linux operating systems.
This tutorial will introduce you to many of these features. Consult the Micro Magic
Tools MAX User Guide and on-line documentation for further information.
Introduction
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
1
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
Starting up MAX
2
Micro Magic Tools MAX Tutorial Version 4.2
Before we get started make sure someone has already installed MAX at your site.
To run the tutorials, you need to make a personal copy of the MAX tutorial example
files using mmi_tutorial.
Step
1.
To install the MAX tutorial, type the following at the UNIX prompt:
mmi_tutorial
Make sure that the appropriate tool (MAX) is selected and then click on Install
Tutorial. The default installation directory is “mmi_private/tutorial” in your
home directory. You can also select a different directory for installation. Don’t
worry if the directory doesn’t exist, the mmi_tutorial script will make it if it
can. You can also use this to reinstall a clean copy of the tutorial.
Step
2.
To start the tutorial, you must first “cd” (change directory) to the directory that
you installed the tutorial into. If you used the default directory, type:
cd ~/mmi_private/tutorial/max
Otherwise, replace the above directory with the directory you selected. This
directory contains files that you will need to run the tutorial.
Step
3.
Then to start MAX, simply type:
max
A window should come up that looks something like Figure 1. The rest of this
portion of the tutorial will go over each section of the MAX windows.
Figure 1: MAX Window
MAX Screen Layout
On the very top of the window the title bar should say “max: UNNAMED”.
“UNNAMED” means that you have not specified the file (cell) you wish to edit.
Next, across the top you should see the menu bar which contains the following
menu items: File, Edit, View, Tools, Misc, Local, and Help. These are pull down
menus much like any other application.
Directly to the right of the Help menu is the MAX Message Area. Depending on the
location of the cursor, it currently says something like “main mode, BUT-1 selects,
BUT-2 moves selection...”. The MAX Message Area is a sort of mini-help feature. It
tells you what each mouse button does, and when you have pulled down one of the
menus from the menu bar, the message area will give you a short explanation of
what the highlighted menu item does.
The remainder of this section of the tutorial goes over each area of the MAX
window. Refer to the MAX User Guide for a more detailed description of the MAX
window. Figure points out the different attributes of the MAX window.
Introduction
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
3
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
Figure 2: Things in MAX Window
4
Micro Magic Tools MAX Tutorial Version 4.2
Palette
DRC Status
Edit Window
Zoom Bar
Message Area
Cursor
Coordinates
Box Area
Display
Cell Lists
Navigation
Window
Cell List Boxes
Down the right side of the window are several small List boxes.
Each List Box contains cells in a given directory. That directory can be the user's
“working directory” or a library.
Additional List Boxes can be added (or boxes deleted) by clicking the left mouse
button (Button-1) over the List box header (the part that says users/tutorial/max
in Figure 1).
Then simply click the left mouse button (Button-1) on either Make new list box, or
Close this list box.
The directory the list box points to can also be changed by clicking on the desired
directory. The directory list includes the directories of all cells that are currently
loaded into MAX.
Your .maxrc file can specify library directories to be autoloaded at startup time.
The .maxrc file contains several other useful pieces of information. (See the Micro
Magic Tools MAX User Guide for more details.)
You can adjust the width of the list boxes by moving the mouse pointer over the
vertical bar just to the left of the text. The bar will change to a little line with arrows
on both the left and right sides.
When the arrows appear you can adjust the width by simply holding down the left
mouse button (Button-1) and dragging the mouse to the left or right.
Navigation window
Below the list boxes is the Navigation Window. For large designs, you can use the
Navigation Window to control the view you see in the main MAX window.
Simply holding down the left mouse button
(Button-1) and dragging out a region in the
Navigation Window will cause the main window to
zoom to that region.
The small colored buttons on the right of the Navigation Window allow you to do
several things.
The topmost button (green by default) will toggle between the last two zoom views.
The additional buttons allow you to save and return to views.
For example, if you were at a view you knew you wanted to return to, you
would simply click the right mouse button (Button-3) on the middle (blue)
button to remember that location and zoom factor.
If you later wish to return to that view you simply click the left mouse button
(Button-1) on that blue button to return to where you were.
The top button always toggles to the last view. If you desire, you can add additional
buttons to save views. Both the number of view-save buttons, and their colors, can
be changed in your .maxrc file.
Scroll and Zoom bars
Scroll Bars are laid across the bottom and right side of the Layout Window (and on
the right side of the List boxes). These work like the scroll bars in most other
applications.
Below the bottom scroll bar is the Zoom Bar. Pulling the slider button to the left
zooms in, and to the right zooms out.
Introduction
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
5
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
Mouse Coordinates and Box Size Location
6
Micro Magic Tools MAX Tutorial Version 4.2
In the lower right hand corner the Box Size (in microns) is displayed. (More about
the Box later.) This is useful when you wish to make an object a precise size. It is
also useful for when you select an object and want to know how big it is.
Just to the left of the Box Size is the Mouse Coor dinates displa y. Mouse coordinates
are oriented with respect to the top level cell.
DRC Control and Status
In the lower left corner is the DRC Status Box. It tells you the current status of the
continuous interactive DRC which runs in MAX. The DRC Status Box also has a small
radio button to turn the interactive DRC on or off with left mouse button.
The Palette
Down the left side of the window is the Smart Palette. The Smart Palette provides
many features:
■ It controls which layers are visible, and lets you choose layers for ‘painting’
(drawing rectangles).
■ It gives feedback on what is currently under the cursor, and what is
currently selected.
■ It allows you to control which layers can be selected.
■ And finally, it allows you change the color or stipple patterns of any of the
layers.
Refer to the MAX User Guide for more details.
Layers
Just above the palette are several buttons (Active:, -cells-, -all-).
Active lets you select the active layer. If you start a wire, it starts in the current
Active layer. If Active is set to auto, the wire starts on the layer the cursor is currently
over, or the default layer (usually set to M1).
Cells controls whether or not sub-cells and gcells can be selected.
All allows you to make all of the layers visible or invisible at the same time.
Getting Help
Before we go any further, here is how to get help if you ever need it.
There are several levels of help available “on-line” to MAX users. You already know
about the quick Help listed in the MAX Message Area. In addition, you can access the
complete on-line manual, the complete list of active hotkeys, and complete
documentation of the text commands at any time.
Step
1.
Assuming you have MAX running, click and hold down the left mouse button
(Button-1) on the Help menu. This should pop up a sub menu as shown in
Figure 3.
tells you the version of MAX you are running, the technology you are
using, etc. You should make sure that you are running the mmi18 technology for this
tutorial.
About MAX
Step
2.
If the technology is NOT set to mmi18 then quit out of MAX (Hotkey: Ctrl-d) and
restart it by typing:
max -tech mmi18
is a generic 0.18um CMOS technology provided by Micro Magic Tools. It is
similar (although not exactly the same) to many current 0.18um technologies and is
a good place to start if you need to generate your own technology file.
mmi18
About MAX will also tell you where the MMI_TOOLS environment variable points to.
(This is the directory where the MMI tools are installed at your site.)
Figure 3: MAX Help Menu
Introduction
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
7
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
8
Current Hot Keys gives you a list of all available hot keys. You can also hit the Space
bar to bring up this list.
Text Commands/Variables brings up documentation for the MAX text commands and
variables. Text commands are useful for writing scripts, generators, and other
helpful programs. Text commands and the Tcl/Tk interface are the MAX API. They
allow the user to add their own features to the Local and Tool menus.
MAX Manual brings up the MAX manual in your browser. The default browser is
Netscape . This can be changed in your .maxrc file.
MAX Tutorial brings up this tutorial.
MMI Documentation Guide brings up all of the documentation for all of the Micro
Magic Tools software. This document has links to items like the Micro Magic Tools
SUE User Guide, the Micro Magic Tools MAX User Guide, other Micro Magic Tools
software programs, and even to this tutorial.
Before proceeding you should bring up the Micro Magic Tools MAX User Guide and
see what's there. The User Guide is the reference manual to MAX and contains lots
of information that you will not find in this simple tutorial.
You might also want to look at the menu items just to familiarize yourself with
what's there.
Tear Off Menus
Sometimes it is convenient to make a menu its own window.
For example:
Step
1.
Going back to the Help menu: when you hold down the left mouse button
(Button-1) over the Help menu notice that there is a dotted line just before the
About MAX menu item (not shown in the above figure).
Step
2.
If you release the button while over the dotted line the menu will “tear off”. The
menu then becomes a full-fledged window, like any other window on your
desktop. The exact behavior will depend upon which OS and window
environment you are running.
If you are running SUN’s Common Desktop Environment (CDE) then the following
applies:
■ The window iconifies by clicking the small dot in the top right corner.
■ You can move the window by clicking and holding down the left mouse
button (Button-1) over the top title bar and dragging it around (release
button to stop).
■ Or you can close the window by holding down the right mouse button
(Button-3) over the top title bar and selecting Close from the menu that
pops up, or typing Alt-F4.
If you are running another window manager, your windows might behave a little
differently. Consult your window system documentation for more details.
Micro Magic Tools MAX Tutorial Version 4.2
The chosen menu will stay pulled-down until you select a menu item, or another
menu.
Introduction
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
9
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
10
Micro Magic Tools MAX Tutorial Version 4.2
Part
2
Simple Layout
OK, let's get started on some layout.
Step
1.
Go to the File menu and select New... This will bring up the File Select box.
Step
2.
Type in the cell name foo where it says Filename:. Then click OK, or hit Return.
The UNNAMED at the top of your MAX window should now say foo. This means that
you are now editing the cell foo. When you save it out it will be saved as foo.max.
Also, notice that foo now appears in the Cell List Box on the right side of the MAX
window.
Using Gcells
While MAX can do very low level full custom layout, it also has a complete Tcl/Tk
interpreter built in. Tcl is a language developed by John K. Ousterhout at UC
Berkeley. Tk is the windowing tool kit. Books on both can be found at your local
bookstore. The Tcl/Tk interface in MAX allows full access to MAX layout
functionality, providing unprecedented power and flexibility.
A gcell is a cell generator written in the Tcl/Tk language. The gcell generates layout
for a cell automatically from “properties” that you specify using a simple menu
interface. MAX comes with gcells to generate FETs and Vias.
Step
1.
Go to the List Box down the right side and select fet from the list by clicking on
it with Button-1. The G next to the fet indicates that this cell is a gcell, or
generator. .
If you do not see fet in the List box, click and hold
the left mouse button (Button-1) over the List box
header to display the directory list, then select the
directory ending in cells. This is the directory that
contains the fet and via gcells provided with the
Micro Magic Tools software.
Simple Layout
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
11
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
12
Figure 4: FET Gcell
When you click the left mouse button (Button-1) on fet in the List Box, the fet
generator window will pop up. It should look something like Figure 4.
Step
2.
Now, change the width to 2.0. This will make the nfet 2.0um wide.
Step
3.
Since we eventually want to use this device to make a 2 input NAND gate,
change fingers to 2, and contacts to both.
Contacts allows you to put contacts on the left side, the right side, both sides,
between the devices (all), or no contacts at all. Click on Help or refer to the Micro
Magic Tools MAX User Guide for more details.
If you click the left mouse button (Button-1) on the word both it will change to the
next option. Clicking the left mouse button (Button-1) on the little bar to the right of
this option will bring up all of the possible options.
Step
4.
Now click Done.
Two nfets merged (stacked) together should appear, attached to the upper-right
corner of the cursor.
Step
Micro Magic Tools MAX Tutorial Version 4.2
5.
Click Button-1 to place the nfets in the window.
Step
6.
Type v (the hotkey for Zoom To Fit Edit Cell under the View menu) and the
layout will be centered in the window.
Your screen should now look like Figure 5.
Figure 5: Generated nfet Gcell
The white text on the cell tells you that you are editing a fet (label at top), and that it
is 2 gates x 2 microns wide, at a .18 micron channel length.
Notice that the letter M appears to the left of foo in the Cell List Box. This tells you
that foo has been Modified .
You can undo whatever you have just done in
MAX. Use the u hot key or select Undo from the
Edit menu. You can also Redo what you have just
undone using the Shift-u hotkey. There are 99
levels of undo in MAX. If you can remember back
more than 99 items please call us, we would love
to meet you!
Zooming
Step
1.
Now zoom out by typing Shift-z, or use Zoom Out in the View menu. You can
also use the Zoom Bar at the bottom just below the scroll bars.
There are several methods for zooming found in the View menu.
Simple Layout
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
13
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
14
One easy way to zoom to the exact region you want is by using the zoom hotkey.
Step
2.
Type z. This puts you in zoom mode. Note that the cursor has changed. Next
hold down the left mouse button (Button-1) and “drag” out a box which
surrounds the region you wish to zoom to. When you release the mouse the
screen will zoom to where your box was.
Step
3.
If you mess up don't panic. Remember, u will undo, and v will always zoom to
fit.
One often-used technique for zooming is to use the j hotkey to zoom in by a factor
of two centered on the mouse. The hotkey Shift-z can be used to zoom out by a
factor of two.
Selecting and Moving Layout
There are two types of layout you can select and move in MAX: objects and paint.
Objects may be sub-cells (cells), generated cells (gcells) or polygons.
Paint is basically flat layout. Think of paint as if you were painting something with a
paintbrush. You can apply paint, remove paint, you can even stretch and drag paint.
Paint is similar to flattened objects in other layout editors, but more flexible.
There are many methods for selecting objects and paint.
When MAX is in main mode (the default), if you simply drag out a region while
holding down the left mouse button (Button-1), whatever is within the box will be
selected when you release the button and will be highlighted in white.
Step
1.
Drag a box over the stacked nfets we just drew. When you release the mouse
button, whatever is “selected”, in this case the fet gcell, will be highlighted.
Once you have selected an object or paint you can do lots of things with it.
Step
2.
For example, you can rotate it by typing the r hotkey. Try it.
Step
3.
Type r three more times will rotate the object back to its original position.
Step
4.
You can move layout up/down/left/right one grid at a time by using the arrow
keys.
Step
5.
You can also move any layout by first selecting it, then clicking and holding
down the middle mouse button (Button-2) and dragging it around the screen.
You can also select objects or paint by clicking on them.
■ Clicking the left mouse button on a piece of paint selects that particular
rectangle of paint.
■ Clicking on a cell, gcell or polygon will select the object.
■ When there are multiple layers under the mouse cursor, clicking more
than once will select each thing in turn. You can keep clicking until the one
you want is selected. The Probe command (Shift-Button-1) opens a popup
window showing everything underneath the cursor.
Micro Magic Tools MAX Tutorial Version 4.2
MAX also supports Cut, Copy, and Paste in the same format you would see on any
good Mac- or PC-based drawing or painting program.
All of the zoom, move, cut and paste, rotate, etc.
features that we just executed using hotkeys also
have menu equivalents which can be found in the
Edit and View menus.
Duplicating gcells
We now wish to create a couple of pfets. We could go back to the List box and select
the fet generator again, but there is another way.
Step
1.
Simply select your nfet by either clicking the left mouse button (Button- 1) over
it, or by dragging a box around it using Button-1.
Step
2.
Now select Duplicate from the Edit menu, or type d. This creates a duplicate of
the selected objects (or paint) slightly offset from the original.
Step
3.
Hold down the middle mouse button (Button-2) and move the new nfet above
the existing nfet.
Notice that when you selected the fet and held down the middle mouse button
(Button-2) the cursor changed to a 4-way arrow. This change in the cursor tells you
that you are in a mode other than main mode. In this case you are in move mode.
Now you will begin to see the true power of gcells.
Step
4.
Select the top nfets and then type e, or select Push Into Cell from the View
menu. The popup menu shown in Figure 5 appears.
Step
5.
Click on nfet to change it to a pfet.
Step
6.
Change the width to 4, to make the pfet 4µm wide.
Step
7.
Change contacts to all by either clicking several times on the box next to the
word contacts, or click Button-1 on the little bar on the right side of the box
next to contacts and then click Button-1 on “all”.
Step
8.
Once you are finished click Button-1 on Done to invoke the generator. This will
change the old nfets to magically become new 4um wide pfets with contacts in
the middle and on both sides.
Simple Layout
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
15
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
16
Figure 6: Edit Properties Form For fet Gcell
Stretching gcells
As you have seen, gcells can be used to create fets and vias. The wiring tool can also
automatically drop gcell vias. You can change the size of a gcell fet by:
■ Using the e hotkey, and accessing the Edit Properties box, or
■ Doing an Edit Cell or Object In Place from the View menu (hotkey: Shift-e).
Place the mouse near the bottom (or top) of the fets, and the cursor will
change into a double-headed ‘stretch arrow’. Holding down the middle
mouse button (Button-2), drag up or down to stretch the fet.
Try this on your pfet:
Step
1.
Select the pfet by clicking on it with Button-1.
Step
2.
Type the Shift-e hotkey.
Step
3.
Move the mouse to the top of the pfet, hold down Button-1 and drag the mouse
up.
Step
4.
Undo the new width with the u hotkey.
This trick also works on vias, except the outcome is placing multiple vias!
You can stretch a well contact to help you with
things like quickly building guard rings.
Micro Magic Tools MAX Tutorial Version 4.2
Aligning objects
It would be nice if our new fets were lined up. One way to align objects is to draw a
ruler (hotkey: Control-r), zoom way in, and carefully move the objects until they are
aligned with the ruler. But a much easier way is to use the Align Objects command.
First, select all the objects to be aligned. One easy way to select multiple objects is
to hold down the Shift key while clicking on them with the left mouse button
(Shift-Button-1.) The Shift-Button-1 means “add or subtract something under the
mouse to/from the selection”. If the gcell is selected, it will be deselected, and vice
versa. You can tell when the gcell is selected because its outline is highlighted, and
its name and size are also displayed in white.
Step
1.
Press Shift-Button-1 over the two gcells until they are both selected.
Second, you must place the box. By selecting the gcells with Shift-Button-1, the box
has already automatically been placed over the last gcell you selected. The gcells
will be moved so they align with the box, which, in this case, means that the first
gcell you selected will be moved so it aligns with the second gcell you selected.
Finally, use the Align Objects command.
Step
2.
Choose Align Objects from the Edit menu (hotkey: Control-a).
Step
3.
Make sure that left sides (the default) is selected (has a red dot next to it.)
Step
4.
Click Done. The gcells are now aligned vertically on their left sides.
Continuous DRC
We are now going to see a really powerful feature in MAX, real-time DRC.
Step
1.
With the new pfets on top of the nfets, select the pfets.
Step
2.
Now, either using the arrow keys (best for precise placement) or by holding
down the middle mouse button (Button-2) and dragging, move the pfet just
above the nfet as shown in Figure 7.
Simple Layout
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
17
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
18
Figure 7: Real-time DRC
If you move the pfet too close to the nfet, little white dots will appear. These little
white dots tell you that there is a Design R ule Check error (DRC error).
Notice that as you move the pfet closer or further away the DRC errors show up in
“real” time! This is one of the powerful features in MAX.
The Continuous DRC means you don't even have to learn the DRC rules, or count
grids. Just move things closer together until you see the white dots, and then back
off a little. The small DRC error box, to the left of the zoom bar, displays the number
of errors.
If you are curious about what the error represented by the white dots is, then you
can draw a box around the white dots, type Shift-y or choose Explain DRC under Box
from the Misc menu. Look for the list of DRC errors in the MAX command window
(the window from which you started MAX).
We are going to use the DRC Results form to view the DRC errors.
Micro Magic Tools MAX Tutorial Version 4.2
3.
Move the pfet close to the nfet, as shown in Figure 6, so that DRC errors occur.
4.
Select DRC Results from the Misc menu. You should see a popup window
similar to Figure XX.
Figure 8: DRC Results Popup Form
5.
Click on Next Error to step through all of the DRC errors. Notice that each DRC
error is highlighted in the layout, and the text of that DRC error is displayed in
the DRC Feedback window as well as the MAX Message Area.
6.
When you are finished looking at the DRC errors, click on Close in the DRC
Feedback popup window.
Refer the the MAX User Guide for more details on the DRC Results popup window.
This window can also be used to view results of DRC runs with other tools, such as
Cadence Calibre.
7.
For now, place the pfet above the left nfet so that the gates of the pfet and left
nfet line up (this should be the case already after you aligned them). Then
move the pfet up until it is DRC correct (no white dots) as shown in Figure 9.
Figure 9: FETs Lined Up
The Continuous DRC feature uses design rules defined in the MAX technology
This single plain text file defines all the design rules needed by MAX’s
extensive DRC. The technology file uses a simple table format for most rules,
resulting in a compact, easy to understand file format that can be as short as a
single page. Micro Magic Tools provides common CMOS technology files as a
starting point to build your own, or, you can build a prototype technology file
automatically from an existing GDS file by choosing Import File from the File menu.
For further information, refer to Chapter 6: “MAX Technology Targeting” in the
Micro Magic Tools MAX User Guide.
file.
Simple Layout
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
19
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
20
Wiring Mode
Now you will route up the poly. You could route the poly by drawing rectangles and
then filling them with poly (red) paint, but that's a lot of work. There's a much
easier way — use MAX's built-in wiring tool.
Step
1.
To use the wiring tool type w, or select add wire from the Edit menu.
Notice the cursor has changed. Remember, that's to let you know you are in a
different mode. In this case, you are in wire mode.
Step
2.
Place the cursor over the poly on the right hand nfet (fet on the bottom) and
click the left mouse button (Button-1).
Step
3.
Now move the cursor up. A poly wire should follow the cursor, as shown in
Figure 10. If the wire doesn’t start in poly, check and make sure the Active
layer is set to auto (the upper left corner of the MAX window).
Figure 10: Drawing A Wire
Micro Magic Tools MAX Tutorial Version 4.2
Step
4.
If at any time when in wire mode you wish to bail out and start over, you can
do so by typing Ctrl-c.
Ctrl-c always aborts any sub-mode and returns
you to main mode.
As the pfet is not directly above the nfet we need a “kink” in the wire. You do this
by simply clicking the left mouse button (Button-1) where you want the kink.
Step
5.
Move the cursor up and then click with the left mouse button to add a kink.
Step
6.
Now move the cursor to the right until it's directly under the pfet poly and click
the left mouse button again to add another kink.
Step
7.
Finally, move the mouse up until it's over the pfet poly. If you glance up at the
MAX Info Bar, notice that it says “BUT-1 adds new segment BUT-2 ends”. This
means that when you click Button-2 it ends the wire.
In fact, MAX does even better than that. If you click the middle mouse button over
the poly but are not exactly in the middle of the wire, MAX will actually snap the
wire into place for you and end it. How about that?
If you didn't put the wire exactly where you wanted it don't worry. You can always
undo. While in wire mode, undo (u) will back up one segment at a time.
You might have noticed that the little piece of poly you just added is a brighter color
than the poly that was part of the gcell fets. This is a feature in MAX that is designed
to help you know what you are editing. Paint or objects that you draw in the cell you
are currently editing show up brighter than the cells you are not editing. This
includes gcells. Thus, since you are not editing the gcell fets, they show up dimmer
than the cell that you are editing. If you wish to have all of the layers show up the
same brightness (even in the gcells or subcells) then go to the View menu, select
Display Options..., then select Dim Non-Edit Cells and click Done. The radio button
should go “off” and the non-edit cells no longer dimmed.
Editing a Placed Wire
Once a wire has been placed, you can edit the wire. The Edit menu contains
commands to Move, Stretch, and Fill any painted layout, including wires.
You may find that it is sometimes even faster to simply redo a wire if you need to
make a number of edits.
If you just want to move the wire a little you can select the wire segment you wish
to move and then move it using the arrow keys. The arrow keys will do a “stretchy”
move.
Let’s try a stretchy move with our connected fets.
Step
1.
Draw a box by holding down and dragging Button-1 so that it encloses part or
all of the pfet, and part of the vertical section of the poly wire, as shown in
Figure 11.
Simple Layout
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
21
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
22
Figure 11: Stretchy Move
Step
2.
Press the up arrow key a few times and notice that the poly wire stays
connected.
Step
3.
Undo your stretchy move with the u hotkey.
Now let’s move the middle segment of the poly wire.
Step
Micro Magic Tools MAX Tutorial Version 4.2
4.
Select the horizontal section of the poly wire as shown in Figure 12. You will
probably have to click twice with Button-1 over the middle segment in order to
get the entire horizontal segment.
Figure 12: Moving Wire Segment
Step
5.
Use the up and down arrow keys to move the segment. Notice that the wire
stays connected.
If you want to move (and keep the net connected)
the segment a long distance, you can use
Ctrl-Button-2. Using Button-2 without the Ctrl will
move the segment but will not maintain
connectivity.
If you are using the arrow keys for the move and
do NOT want the wires to stretch, hold down the
Shift key when moving the selected layout.
The Fill command fills the area bounded by the box with whichever layers touch (or
extend past) the edge of the box. The effect is to extend whichever layers touch one
edge of the box all the way to the other edge of the box. Refer to the Micro Magic
Tools MAX User Guide for more details.
Now wire up the metal just as you did the poly.
Step
6.
Get into wire mode (hotkey: w) and then click on one of the contacts and draw
the metal so it looks like Figure 13.
Step
7.
First wire the two left contact regions and then add the connection to the right
pfet contacts.
Simple Layout
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
23
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
24
Step
8.
Wire the left poly gates as shown in Figure 13.
Figure 13: Wired 2 Left Poly Gates
When starting a new wire, the Active Layer box (remember it's on the top left just
under the File menu) tells you what layer the wire (or circle or polygon) is going to
be drawn in. If it is set to auto it picks the layer under the mouse.
If you want to tell it exactly which layer to start drawing on, then hold down the left
mouse button (Button-1) over the Active Layer box. When the popup appears simply
place the mouse over the layer you want and then release the button.
Since you have done a fair amount of work you should now save your layout.
Step
9.
Type Ctrl-s, or select Save from the File menu. Notice that the M next to the foo
in the Cell List went away.
Adding the Power Rails
We are ready to put in the power rails. Let's say we were laying out this NAND gate
for a standard cell library. Furthermore, assume that the power and ground rails are
run in Metal 1 (M1) and that they are 2µm wide.
Micro Magic Tools MAX Tutorial Version 4.2
We could use the wire tool to draw the power rails, by drawing wires with width set
to 2um. To do this, you would start drawing a normal wire (hotkey: w) in layer M1,
positioned above or below the fets. Then, press the right mouse button (Button-3) to
access a popup menu for wiring options, including the current wire width. Here you
can set the wire width of the current wire segment(s) to 2um, or whatever width
you want.
You can also set the default width, spacing, and snap grid for each wire layer in the
Wiring Parameters menu. It is found under User Preferences in the File menu, then
choose Wire Setup... (or just use the Shift-w hotkey), then choose Wiring Parameters.
But this is a good opportunity to use paint directly. MAX has excellent capabilities
for low-level layout “rectangle hacking”, and this is an ideal way to put in the power
rails. To use paint effectively in MAX, we will first have to learn to manipulate the
Box and use the Palette.
The Box
The Box is important in MAX because it is used by many commands to determine
where you are going to place, or do, something. For painting, the Box marks the
region where paint is going to be drawn or erased. We have already seen the Box on
the screen while doing the commands above; for example, the Align Objects
command.
You can create a box by simply holding down the left mouse button (Button-1) and
dragging the outline about a region.
Drawing a box by holding down Button-1 also
automatically selects what is under the box, so
don’t drag a box around an entire chip! Use Box
Mode (below) for that.
Assuming you were in main mode (the default), any paint within the box is selected.
This is the way we have done things thus far.
You can also position the box exactly by typing Shift-b, or selecting Box Dimensions
from the Misc menu, or by clicking on the Box Size window in the lower right
corner of the display. Any of these will show a menu that allows you to precisely set
the box size.
Simple Layout
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
25
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
26
Box Mode
Box Mode is useful when you need to do detailed layout. You can resize the box to
the exact size you want, and place it exactly where you want it, without having to
worry about corrupting any existing paint that you might have inadvertently
selected.
Dragging out a box in this mode does NOT select
anything.
After typing b, (or Make Box in the Misc menu) you can do any of the following:
■ You can specify a new box position by holding down the left mouse button
(Button-1) as you drag out a region, then release Button-1.
■ Resize the existing box by moving the mouse over the sides or corners of
the existing box until the cursor icon changes (to either a ‘stretch-arrow’ or
a ‘corner’), then drag that side or corner by pressing and holding the left
mouse button (Button-1.)
■ Move the box by holding down the middle mouse button (Button-2) and
moving the mouse.
The Palette
A few more words about the Smart Palette. Remember, down the left side of the
window is the Smart Palette.
The Smart Palette provides many features. It allows you to control what you can
see, what you can select, what's under the cursor, what you can paint, and what the
layers look like. Remember the MAX Message Area (directly to the right of the Help
menu) will tell you what the available options are if you place the mouse over the
palette.
■ To control which layers are visible, click the left mouse button (Button-1)
over the little colored square. To control visibility by group, click the left
mouse button (Button-1) on the group button (i.e. met al, active, etc.). This
is a very useful feature for reducing clutter when you are working on a
subset of the layers.
■ To control which layers are selectable, click the left mouse button
(Button-1) over the layer name (such as m2, v12, pfet, and so on). The
button with the layer name will turn grey when that layer can NOT be
selected. Or click the right mouse button (Button-3) over the group button
to toggle selectability for the entire group.
■ To paint layers, click the right mouse button (Button-3) on either the text
or the little paint square for the layer you wish to paint. This will put that
layer in the region specified by the Box.
Micro Magic Tools MAX Tutorial Version 4.2
■ Layers which are under the mouse are indicated by the little red
rectangular LED's just to the left of the colored boxes.
■ Layers which are currently selected are indicated by the layer name
changing from black to red.
■ Finally, you can change the color or stipple patterns of any of the layers
by clicking the middle mouse button (Button-2) over either the colored box
or the layer name. This brings up the MAX Color/Stipple Editor. Using the
editor, you can even change the colors of things like the background (for
example, make it black), the grid, labels, etc.
While the grid color is changed in the Color/Stipple Editor, the grid size and style
are changed in Grid Setup... under User Preferences in the File menu, or by typing
the Shift-g hotkey.
You can also paint by clicking the right mouse button (Button-3) over any existing
paint of the type you wish to paint with. That is, you can click the right mouse
button (Button-3) over an existing piece of poly in the layout window and it will
paint with that layer just as if you clicked on that layer in the palette.
Note, however, that if you click over a place with NO layout then the area under the
box will be erased.
Remember, Undo (hotkey: u) can recover from this.
Painting the Power Rails
Now we are ready to add the power rails as paint rectangles.
Step
1.
Hold down the left mouse button (Button-1) and drag out a region where you
want to paint the new Vdd power rail as shown in Figure 14.
Simple Layout
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
27
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
28
Figure 14: Drawing a Box for Painting Power Rails
Step
2.
Place the cursor over the M1 button in the palette (on the left), then click the
RIGHT mouse button (Button-3) on either the text ‘M1’ or the little blue square
(palette box) immediately to the left of the word ‘M1’.
Make sure you hit the RIGHT mouse button
(Button-3). Clicking the left mouse button
(Button-1) on the paint square toggles that layer's
visibility, or if over the layer name, that layer’s
selectability.
If the box isn't the size you want it (see the lower right corner for the box size) you
can make the box exactly 2µm tall.
Step
3.
Undo (u) the M1 paint before we resize the box.
Step
4.
To make the box an exact size type Shift-b, or select Box Dimensions from the
Misc menu. A popup menu as shown in Figure 15 appears.
Micro Magic Tools MAX Tutorial Version 4.2
Figure 15: Box Dimensions Popup Form
Step
5.
Make sure the Specify Box by: is set to origin+size. Then type in 4.0 for the width
and 2.0 for the height, then click Done.
Step
6.
Fill the box with M1 by clicking the right mouse button (Button-3) on the ‘M1’
paint square in the palette.
Remember you can always resize or move the box as previously described in the
section on The Box.
You can change the size of a paint region by stretching an edge of any width using
the Edit Rectangle Edge command found in the Edit menu (hotkey: a).
■Simply type a. The cursor changes to let you know you are in Edit Edge mode.
Now move the finger over the edge you wish to stretch. A little select box will
show you which edge you are over.
■Once you have the edge you want, hold down the left mouse button (Button-1)
and move the mouse in the direction you wish to stretch the edge. Release the
button when the edge is where you want it.
■You can also change the size of a paint rectangle by first selecting it, and then
selecting Edit Properties from the Edit menu (Hotkey: p).
Once you have painted the top power line you can simply duplicate the top power
line and move it down.
Step
7.
Select the power line with the left mouse button.
Step
8.
Duplicate the top power line (hotkey: d) and move it down as shown in
Figure 16.
If you duplicate something and hold the Shift key down
while moving it, the duplicated item will remain lined up
with the original.
Simple Layout
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
29
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
30
Figure 16: Nand Wired to Power Raill
Now that you have painted in your power and ground rails you should wire them up
using the Wiring Mode as before.
Step
9.
Step
10. Now connect the right nfet contact region to the ground rail.
After you have entered the Wire Mode (w), hold down the Shift key and click the
left mouse button (Button-1) over the middle of the pfet contact region. This
will start a M1 wire with the width of the M1 under the cursor. By holding down
the Shift key you are telling the wire tool to use the width of the wire under the
cursor and NOT the minimum wire width. Connect it to the power rail.
Your cell should now look like Figure 16.
Wiring Mode - Changing Layers
Notice that the inputs and outputs are all found within the power straps. What if
they need to be brought out so a router can get to them?
Let's assume the router requires all signals to be at the top of the cell and in M1. You
need to route the poly wires over the M1 power straps and then change to M1.
Wire Mode in MAX can make this job easier since it can change layers for you.
Micro Magic Tools MAX Tutorial Version 4.2
Step
1.
To route the wire, type w (Wire Mode) and click the left mouse button (Button-1)
over one of the poly wires.
Step
2.
Drag the mouse up and over the M1 power rail.
Step
3.
Type d. This will drop a poly to M1 contact for you, which you can move around.
Step
4.
Now try moving the mouse to the left. This will draw a M1 line left of the
contact. While holding the mouse to the left try moving it up and down (north
and south).
Notice that the contact tracks the vertical location of the mouse for you. Also notice
that the DRC is working while you are moving the contact. Whenever you get too
close to the M1 Vdd line, the little white DRC dots appear, as you can see in
Figure 17.
Figure 17: Active DRC Showing Errors As Wire Is Drawn.
Step
5.
When you get the contact where you want it (no DRC errors), press and hold
the right mouse button (Button-3), then select anchor vertex from the popup
menu (hotkey: a) to ‘freeze’ or anchor the contact in place. Then drag the
mouse upward.
Simple Layout
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
31
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
32
As you continue dragging the mouse upward notice that you are now in M1. If you
hit d (drop a contact) again, you will add a via1 and automatically change to M2,
and so on until your technology runs out of metal layers.
The generic technology file we have included (mmi18) has six layers of metal.
Step
6.
End the wire by clicking the middle mouse button (Button-2) at the desired
location, as shown in Figure 17.
Typing d in wire mode drops a contact and brings
you up to the next higher layer. If you want to go
down a layer simply type Shift-d and the wiring
tool will drop a contact or via, and bring you down
to the next lower layer.
There are LOTS of other options in the wiring tool, such as snap to grid, wire in 45's,
change wire layer, and more.
■To see the Wire Mode menu simply hold down the right mouse button
(Button-3) when in wire mode. This will bring up the Wire Mode pop-up menu.
■One of the options is Shift-w which brings up a more extensive Wire menu
(also found as Wire Setup... in User Preferences under the File menu). This menu
gives you options like the Active Layer (which can also be set via the Active Layer
Box in the upper left corner of MAX), the Default Layer, Snap options, and you
can even override any or all of the wiring parameters.
Remember, for a list of all the options (hotkeys) while in wiring mode, hit the Space
bar, or select hotkeys in the Help menu.
Space bar works for ALL modes in MAX.
Step
7.
Wire up the other poly input.
Your cell should now look like Figure 18.
Micro Magic Tools MAX Tutorial Version 4.2
Figure 18: Inputs of Nand Brought Outside
If the top of the M1 wires are not aligned as shown in Figure 18, there are a number
of ways to align them.
Step
8.
The easiest way is to draw a box and select the top edges of both wires. Then
click with button-3 over empty space (any area where there is no layout) and
the selected paint will be erased.
You can also use the Fill command in the Edit menu to extend both top edges of the
M1 wires up. (Refer to the Micro Magic Tools MAX User Guide for more details.)
Erasing Layers
We are getting ready to finish this cell and your boss has just informed you that the
power rails have been changed from M1 to M2.
Step
1.
To change them simply hold down the left mouse button (Button-1) and drag a
box around the upper (Vdd) rail to select it.
Step
2.
Now if you click the right mouse button over a blank space on the screen it will
erase everything within the box. But wait! You also have some poly within the
box. If you erase everything inside the box your poly will also go away.
Step
3.
Undo (u) your last change.
Simple Layout
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
33
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
34
MAX allows you to selectively erase layers.
Step
4.
To do this select the M1 power rail by drawing a box enclosing the M1 power
rail.
Step
5.
Then, hold down the Ctrl key and click the right mouse button (Button-3) over
a piece of M1 in the layer, or ‘M1’ in the palette. The Ctrl key tells MAX to
toggle the paint function and erase the layer instead of painting it.
Like the painting function, erasing works from both the palette and by clicking on
the layer in the actual layout.
You will notice that the box is not the correct size.
We’re now going to erase the M1 a third way.
Step
6.
Undo (u) your last change.
Step
7.
Click with Button-1 on the M1 power rail. You may need to click a second time
to select the entire power rail.
Step
8.
Now, to selectively erase M1, hold down the Ctrl key and click with Button-3
over a piece of M1.
Once you have erased the M1 layer, notice that your box is exactly the size it needs
to be for the M2.
Step
9.
Simply click the right mouse button (Button-3) on ‘M2’ in the palette.
There are several ways to accomplish what you just did. For example, rather than
drawing a box around the M1 power lines - which also selects the poly crossing over
it - you could click the left mouse button (Button-1) over the M1 power line to select
it. Once selected, hit the Delete key to delete the selected item.
Delete will delete everything you currently have
selected, including paint, polygons, gcells, and
sub-cells.
There are several options for mouse selection.
■ Clicking button-1 will select the object or rectangle of paint under the
cursor.
■ Holding down the Shift key while clicking button-1 will add to the
selection.
■ Holding down button-1 while dragging out a region will select objects and
paint within that region.
Once you have selected the layer, rather than delete it and replace it with another
layer, you can also use the nifty little Change Layer feature found in Edit Properties...
under the Edit menu.
Change the lower (GND) M1 and replace it with M2.
Micro Magic Tools MAX Tutorial Version 4.2
Step
10. To do this simply select the M1 rectangle, then choose Edit Properties... from the
Edit menu, or type the p hotkey. Change the layer to M2 and click Done.
Now go ahead and attach the power and ground lines to the new M2 straps.
To do this, use the wire mode.
Step
11. Start the wire (w) from the M1 wires using Shift-Button-1, so that the wire
width will match.
Step
12. When you are over the M2 straps type d to add a via to M2
Step
13. Click the middle mouse button (Button-2) to end the wire.
Step
14. Next route the output to the top over the M2 next to the inputs so the router
can get to it as well.
This will introduce a DRC error if you followed the
layout instructions as stated.
Step
15. Select the two ct_poly gcells and the two pieces of M1 using Shift-Button-1 to
add to the selection, as shown in Figure 19.
Step
16. Use the right arrow key to move the selection to the right until there are no
more DRC errors.
Simple Layout
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
35
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
36
Figure 19: Selected Poly Gcells And M1 Wires
You could also jog the M1 output, or the poly lines going under the M2 as well. It's
up to you.
However you do it, your design should now be DRC correct and look similar to
Figure 20.
Micro Magic Tools MAX Tutorial Version 4.2
Figure 20: Nand Gate Wired Up
Text
There is one last thing before we are finished with our Nand gate.
The input and output nets of the Nand gate should be marked with unique names.
This is accomplished by adding Text to the nets.
To add Text, you first select the paint rectangle where you want to put Text. Simply
click the left mouse button (Button-1) on the piece of paint, which will select the
paint rectangle and place the Box around it. The new Text will be positioned in the
middle of the paint rectangle. Or, to position the Text elsewhere, use the left mouse
button (Button-1) to drag a small box over the paint at the location where you want
the Text.
Step
1.
Select the ground (lower) rail (click with Button-1)
Step
2.
Then type t for Text, or choose Add Text from the Edit menu. The MAX Text Edit
dialog box will appear.
Step
3.
Enter the name GND into the Text field.
Simple Layout
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
37
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
38
The MAX Text Edit dialog box permits you to set the type of Text label: input,
output, and so forth. Marking labels as inputs, outputs, global, etc. can be useful for
use with other extraction or routing tools.
You can also specify the Text “position”, such as n for north, or s for south.
Specifying the orientation of the Text, relative to the crosshair that marks the Text
location, places it on one side or another for easier viewing. The Text “type” can be
a point (the default) or a box. The ‘box’ option produces text which marks a
specified area, but is rarely used.
Step
4.
Specify the GND text direction to be e (east) and specify that it is a global
signal.
Step
5.
Now move the mouse to the point on the layout you wish the text to be and
click the left mouse button (Button-1).
Step
6.
Then click Done or hit Return.
In this tutorial:
■ VDD and GND were marked as global, and are positioned east (e).
■ The inputs (In1,
In2),
and output (Out), were marked as local, and are
positioned north (n).
Step
Micro Magic Tools MAX Tutorial Version 4.2
7.
Add labels for VDD, In1, In2 and Out, as shown in Figure 21.
Figure 21: Adding Labels
Step
8.
Remember to save your cell (Hotkey: Ctrl-s).
At this point our little NAND gate example should be done, and yours should look
something like Figure 22.
Simple Layout
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
39
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
40
Figure 22: Finished Nand Gate
You can copy the cell into a new name. Let’s call it my_nand.
Step
9.
Select Save As... from the File menu.
Step
10. Type in “my_nand” in the Filename field and click on OK.
You will now see both foo and my_nand in the List box. You are currently editing
my_nand.
Selecting Nets
MAX can trace connectivity through vias and contacts to interactively show
everything connected to a net. Place the mouse over any piece of metal, poly or
diffusion and type s, or choose Select Net from the Misc menu. MAX will
automatically select the entire net that is connected to that piece of paint, and will
also display the net name, if known, in the MAX Message Area. The net name(s) are
taken from any Text (labels) attached to the net.
Step
1.
Move the mouse over the M1 rectangle for ‘In2’ in the upper right corner.
Step
2.
Type the s hotkey. You should now see the net highlighted as in Figure 23.
Micro Magic Tools MAX Tutorial Version 4.2
Figure 23: Highlighted Net
If there are multiple layers under the mouse cursor, you type s multiple times to
cycle through the nets.
One nice feature often used for debugging is that,
when MAX selects a net, the name of all of the text
labels on that net are displayed in the MAX
Message Area (at the top, just to the right of the
menus). For example, if you select VDD and the
names VDD and GND both appear, you know you
have a problem.
MAX can also check to make sure you don’t accidently connect two nets with the
wire tool whhich have different net names. If your nets have text on them at the
level of hierarchy you’re editing, you will get a warning when connecting them.
Step
3.
To use this feature, it needs to first be turned on. Type the hotkey Shift-w. You
should see the popup menu shown in Figure 24.
Simple Layout
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
41
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
42
Figure 24: Wire Menu Warning Popup
Step
4.
Click on the Check Connectivity toggle button to turn the feature on, and then
click on Done.
Step
5.
Now use the wire tool (Hotkey: w) to connect the VDD and GND power rails.
Step
6.
When you try to end the wire on the other power rail, you get a warning popup
telling you that you are connecting two different nets. Click on Close.
Notice that the wire does get drawn, even thought it creates a short. The MAX
methodology is to warn you if you’re creating DRC or LVS errors, but still allow you
to create that layout.
Step
7.
Undo (u) the wire.
Advanced Selecting, Duplicating, And Renaming
Let’s look at a few more advanced selection techniques before we go on.
Under the Edit menu there are a few other interesting items.
We already know that we can select pieces of layout by:
■ Dragging the select box around them, or
■ Clicking on them.
To select a cell rather than some paint or an object:
■ Position the mouse cursor over the cell and type f (Select Cell from the
Misc menu). Type f repeatedly to cycle the selection through overlaid cells.
After all cells under the cursor have been displayed, the f key places a box
around the entire cell.
It easier to use the f hotkey instead of the menu item for the Select Cell
command because it uses the mouse cursor location to select cells.
Micro Magic Tools MAX Tutorial Version 4.2
The Probe command is another way to see what layers and objects are under a
particular point.
Step
1.
Put the mouse over some layout geometry in your cell, hold down the Ctrl key
and press the left mouse button (Control-Button-1).
You could also choose Probe from the Misc menu, then point at the location you
want to probe. The Selection Probe menu that appears contains a list of all the
layers and objects under that point.
Step
2.
To select a paint rectangle or other object, click on it in the popup with mouse
Button-1. To deselect it, click again. By default, only items in the current edit
cell are displayed, since those are the only ones you can effectively manipulate.
But if you choose the All Expanded Cells radio-button, the list will contain
everything in any cell under the point where you probed.
Step
3.
You can also clear the selection by choosing Clear Selection.
Another way of duplicating layout is by using the Copy Cell Buffer command in the
File menu. This command will copy the current cell buffer to a new cell buffer in
memory. The new cell will be saved to disk when you Save the cell (from the File
menu.) The Save As command (also in the File menu) is similar to Copy Cell Buffer,
but also immediately saves the cell to disk. In fact, the Copy Cell Buffer command
was used to create an Inverter cell (INV.max) from the Nand cell we just finished, and
the Save As command was used to save cell foo as Nand.max.
If you are working on a cell and want to discard its contents, perhaps to completely
replace it with another cell, you can use the Delete Cell Buffer command (under the
File menu) to delete the in-memory copy of a cell. This command does not affect
the file on disk.
Simple Layout
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
43
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
44
Micro Magic Tools MAX Tutorial Version 4.2
Part
3
Bigger Designs and Hierarchy
Now let's use our NAND gate and an inverter cell to build something a little bigger.
Step
1.
Go to the File menu and select New.... Name the new cell “row”.
You should now be editing row.max.
Look up at the title bar. It should say max: row.
Step
2.
Go over to the Cell List box, hold down the Shift key and click on NAND2 with the
left mouse button (Shift-Button-1).
This should drop an instance of NAND2 into your row cell. Note that this cell looks a
lot like the NAND cell you just laid out; however, to make life easier for you, we have
made sure the power rails will line up with the other cells in the library.
When you want to instantiate a cell, be sure to hold down
the Shift key while clicking with Button-1 on the cell from
the Cell List box (Shift-Button-1). If you only click with
Button-1 on the cell, you will be editing that cell.
Step
3.
The new cell should already be selected. If not, select it now by clicking on it
with the left mouse button (Button-1.)
Step
4.
Select Array Cell... from the Edit menu.
Step
5.
Enter 4 for the columns field and click on Done.
You could also have used the text command:
:array 4 1
Text commands are typed in the MAX Command Window (the window from which
you launched MAX).
Bigger Designs and Hierarchy
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
45
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
46
A list of text commands can be found under the
Help menu. Click on a command in this list to
bring up detailed documentation on it.
Figure 25: MAX Command Hierarchy
Step
6.
Now go back to the Cell List box and, while holding down the Shift key, click
on INV with Button-1.
Step
7.
Place it to the right of NAND2 so that it abuts just as the array of NAND2 cells
abut, as shown in Figure 25.
You can zoom in while you are moving an object using z or Shift-Z or j. Or, you can
place the object and then zoom in and use the arrow keys for more precise
placement. You can also use the Align command to help align the bottom edges.
Your layout window should now look like Figure 25.
Micro Magic Tools MAX Tutorial Version 4.2
Show/Hide Internals
You may now want to see what's inside of the NAND2 cells and the inverter.
Step
1.
To do this, select the INV cell by clicking on it using the left mouse button, or by
typing the f hotkey, and type i, or select Internals, Show Area from the View
menu. (Note: h will Hide Internals.)
Step
2.
To view the internals for the entire cell, select the entire row of NAND2 and INV
cells by typing f over empty space.
Step
3.
Then type i to expand the entire design so we can look at it.
Push, Pop, and Edit in Place
OK, now that we are here, let's say our boss comes over again and says: “Sorry, but
you need to bring the outputs to the bottom of the cells”.
There are two ways to do this. We will use one method on the INV cell and the other
(just to be different) on the NAND2 cell.
Step
1.
First, select the INV cell using f or Select Cell from the Misc menu. If you get a
fet or row selected, type the f hotkey multiple times until INV is selected.
Step
2.
Now type e to edit the cell or select Push into Cell from the View menu.
Step
3.
Once inside the cell, add the output wire as you did before using the wire
mode. Refer to Figure 20.
Step
4.
Now type Ctrl-e or Pop out of Cell from the View menu to “pop” up a level and
return back to row.max. You should now see that the change you made is in the
INV cell within row.max.
Now let's edit the NAND2 cell. To do this one we are going to use the Edit Cell or
Object in Place option from the View menu.
Step
5.
Select the NAND2 cell, then type Shift-e to Edit in Place.
Notice that the NAND2 cell you selected should now appear darker than the other
cells. This tells you that you are now editing that cell.
Step
6.
Go ahead and add your new wire.
Step
7.
Notice that the wire appears in ALL instances of NAND2, not just the one you are
editing.
Step
8.
Type Ctrl-e to pop back up to the top level (row).
Your row cell should now look like Figure 26.
Bigger Designs and Hierarchy
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
47
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
48
Figure 26: Outputs Brought Out to Bottom
Now, just for grins, let's wire up two of the gates. Since we want to wire them up in
row.max and NOT in NAND2.max, we must first make sure row.max is our edit cell.
You can also tell which cell you are editing because it tells you in the MAX Title Bar.
To get back to row.max (if you’re not there already) there are several methods:
■ Type Ctrl-e a few times or until you are sure you have popped out of any
cells you entered using Shift-e or Edit Cell or Object in Place from the View
menu. Watch the MAX Title Bar.
■ You could also have selected row.max from the Cell List box and clicked on
it with the left mouse button (Button-1)
In general, push, pop, and edit in place work well for cells in the same hierarchy,
while using the Cell List boxes is the preferred method for traversing larger, less
connected databases.
Step
9.
Now that row.max is your edit cell, use the wire mode to hook up a couple of
wires.
Notice that these wires are once again darker than the wires in the cells.
Micro Magic Tools MAX Tutorial Version 4.2
Figure 27 shows a zoomed in view of a couple of gates wired up within row.max.
You can see that the wires in row.max (the current edit cell) are darker than the
wires contained within NAND2.max and INV.max.
Figure 27: Cells Wired Up
Now let’s save our work.
Step
10. Select Save Multiple from the File menu, and select Save Edit Cell and
Descendents.
This saves the current edit cell row, as well as any modified cells that are
instantiated in row.
Step
11. Exit out of MAX by typing Ctrl-d or selecting Exit from the File menu.
If you have made changes to cells foo or my_nand since your last save, you’ll get a
warning popup message. You can either Exit and Lose Changes, or Cancel and save
the cells.
Bigger Designs and Hierarchy
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
49
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
50
Micro Magic Tools MAX Tutorial Version 4.2
Part
4
MAX-LS
MAX-LS, an entry in the chip development suite from Micro Magic Tools, includes
ALL of the features included in regular MAX and several added powerful features.
MAX-LS Features
MAX-LS includes all of the standard MAX features, as well as the following
additional ones:
■ SUE base version, without Netlisting and Simulator interfaces.
■ Auto-layout Generation of SUE schematics into MAX.
■ Interactive Cross-probing between SUE and MAX.
One reason for the power of MAX-LS is that both MAX and SUE have complete
Tcl/Tk interfaces. This means that you can write and execute full Tcl programs in
either tool. Tcl also provides a means for inter-program communication.
SUE and MAX use the notion of “send” commands to talk to each other.
Cross-probing is one example of this inter-program communication. Automatic
layout generation and fly-lines are also features gained by using both SUE and MAX.
We are going to use MAX-LS for this next example. Don't worry if you haven’t used
SUE before. SUE and MAX are both part of the Micro Magic Tools chip design suite,
so they have similar interfaces. You can also bring up the SUE tutorial if you wish to
learn more about SUE.
Automatic Layout Generation and Fly-lines
To see how SUE and MAX can work together we are going to bring up a simple
NAND gate in SUE.
Step
1.
First, if you haven't already done so, save your previous work in MAX and then
quit out of MAX using Exit from the File menu.
Step
2.
Now bring up SUE by typing
sue MyNAND
This will bring up SUE and automatically load in the MyNAND.sue circuit.
MAX-LS
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
51
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
52
Your SUE window should look like Figure 28.
Figure 28: SUE Schematic For “MyNAND”
Step
3.
Go to the Sim menu and select sim netlist. It's the top choice.
Step
4.
If the top choice is set to something else, like spice netlist, then select Change
Simulation Mode from the Sim menu and click on the Sim box when the Change
Simulation Mode dialog box comes up.
Step
5.
Now go to the Sim menu and select MAX Cross Probe Init.
The Cross Probe popup menu will appear.
Step
6.
If you have other copies of MAX running, be sure and select Start a New Copy of
MAX.
Step
Micro Magic Tools MAX Tutorial Version 4.2
7.
For MAX Technology, fill in mmi25, as shown in Figure 29.
Figure 29: Cross Probe Menu
Step
8.
Click on Done.
This will launch a new Xterm window, and start up MAX from that window.
Step
9.
Step
10. Now go to the Tool menu in MAX and select Layout Generator.
Step
11. When the file select popup appears, select MyNAND.sim from the Cell List, and
click on OK.
You'll see a message saying there is not an existing MAX layout for MyNAND.
Click on new to generate a new cell.
The Layout Generator window should now come up. This window has several
options.
■ Generate stdcell layers is a shorthand for either “just give me the devices
with flylines” or “give me all of the wells, well contacts, power straps, etc.
needed to make a standard cell-like layout”.
■ If you click on the Edit Per-Cell Options button you have various options like
using gcells or paint for fets, enable flylines, and automatically folding fets
larger than a specified size. If you turn share_contacts on the Layout
Generator will automatically share contacts and diffusions for you. (For
now we don't want to change anything so just hit Cancel.)
■ The Edit Stdcell Options box gives you several options for producing
standard cell-like layout.
■ The Edit Layers to Generate box gives you control over what layers the
Layout Generator will automatically generate for you. This gives YOU, the
designer, the ability to control what the tool does for you and what you
want total control over.
Step
12. Once you are done looking over the many options the Layout Generator has,
simply click Done and the layout for MyNAND will automatically be generated for
you. It should look like Figure 30.
Don’t worry if you get a MAX error popup. The .maxrc file for this tutorial is set
up so that it automatically loads the nand2 and INV cells we used in the
previous section. Those cells were designed for the mmi18 process, and we’re
using mmi25 for this cell. Click on Close in the popup form.
MAX-LS
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
53
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
54
Figure 30: Layout Generator Result
Notice that the devices have already been placed and correctly sized. Where
possible the Layout Generator has even shared contacts and diffusions for you. Also,
notice that there are fly-lines that connect the various nodes together. These
fly-lines tell you how to wire things up correctly.
Now let's wire things up. First, let's wire up the left-most poly gates.
Step
1.
First, turn off the visibility of the other layers by clicking on other in the Palette
with Button-1. This will make the layout less cluttered.
Step
2.
To draw the wire, simply hit the w hotkey to get into wire mode, then click the
left mouse button (Button-1) over the lower left poly gate and drag the mouse
upwards.
Step
3.
Use Button-1 to add corners where needed.
Step
4.
Did you notice that the fly-line tracked your wire as you drew it? See Figure 31.
Micro Magic Tools MAX Tutorial Version 4.2
Figure 31: Flylines Tracking
This feature makes it easy to hook up cells correctly. All you need to do is follow the
fly-lines!
Step
5.
OK, now let's wire up the rest of the cell. If you ever forget any of the wiring
tool options, remember the status box next to the Help menu will tell you what
the buttons do, and you can always hit the right mouse button (Button-3) to get
the Wire Tool pop-up menu.
Your circuit should now look something like Figure 32.
MAX-LS
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
55
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
Figure 32: Wired MyNAND Gate
56
Micro Magic Tools MAX Tutorial Version 4.2
Cross-Probing with SUE
Making sure your circuit is wired up correctly is very important. MAX-LS provides
flylines to help you accomplish this. But what if you import some layout from
another tool, or create the layout without the flylines and you want to make sure it's
correct?
MAX-LS has a powerful feature known as cross-probing. This allows you to select a
piece of layout and highlight the corresponding object in the schematic, or vice
versa. You can initiate cross-probing from either SUE or MAX.
To start the cross-probe from SUE you would select MAX Cross Probe Init from the
Sim menu just as you did to start up MAX. This time let's set up cross-probing from
the MAX side.
To do this simply:
Step
1.
Select SUE Cross Probe Init from the Tool menu in MAX.
Step
2.
Assuming you only have on SUE running, select sue. Don’t start a new copy.
Click on Done.
Once MAX and SUE are done communicating, SUE will highlight the nodes it and
MAX agree upon in blue (see Figure 33), and MAX will highlight the same nodes in
white.
Figure 33: Matching Nets in SUE
Step
3.
Now select the port labeled in0 in the SUE schematic and type k, or select
MAX Cross Probe from the Sim menu. Notice that the wire labeled in0 on the
MAX layout is now highlighted in white! See Figure 34.
MAX-LS
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
57
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
58
Figure 34: Corresponding Net “in0” In MAX
You can also cross-probe from MAX to SUE.
Step
4.
Select the wire labeled out in MAX and then type k, or select SUE Cross Probe
Net from the Tool menu. Notice that the wire labeled out in the SUE schematic
is highlighted in blue.
This is yet another way SUE and MAX help you keep track of your design.
Advanced Features
There are several advanced features found in MAX which were NOT covered in this
tutorial.
For example, customization is possible over a wide range, from minor user
preferences (controlled by the .maxrc file) to megacell generators. See MAX Manual
under the Help menu for more details.
To Learn More About MAX and SUE
To learn more about MAX go to MAX Manual under the Help menu, or refer to the
Micro Magic Tools MAX User Guide.
To learn more about SUE, go to the SUE Tutorial or SUE Manual under Help for on-line
information, or refer to the Micro Magic Tools SUE Tutorial, and the Micro Magic
Tools SUE User Guide documentation.
Micro Magic Tools MAX Tutorial Version 4.2
For additional documentation on any of the Micro Magic Tools chip design suite, use
the on-line reference MMI Documentation Guide under the Help menu.
And, as always, the best way to really learn a program is to use it. We hope that the
Micro Magic Tools programs SUE and MAX will help you do better designs in less
time.
MAX-LS
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
59
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
60
Micro Magic Tools MAX Tutorial Version 4.2
Download