You are on page 1of 6

Proceedings of the

International Conference on Engineering Research, Innovation and Education 2011


CERIE 2011, 11-13 January, Sylhet, Bangladesh
Vol.2, pp. 632-637

MAGIC IN VLSI
A Precise Demonstration on MAGIC towards VLSI Layout Designing

Imran Chowdhury1, Rumana Amin1, Sazzad Bin Kamal1, M.S.R. Shoaib1,2,3, Dr.
Shuza Binzaid4
1
School of Computer Science & Engineering
1
University of Information Technology & Sciences (UITS), Dhaka, Bangladesh
2
Bangladesh University of Engineering and Technology (BUET), Dhaka
3
Bioelectric Research Lab, Dhaka, Bangladesh
4
Founder and Director, SERES, seres-usa.com

Development of VLSI is a unique era in microelectronics, more precisely in integrated circuit industry. VLSI
is the field which involves packing more and more logic devices into smaller areas combining thousands or
many more than that of transistors into a single chip. But the design of very large scale integrated circuit is
far beyond human ability. Therefore, Computer Aided Design (CAD) tools are heavily involved in the
design process. This is highly expensive and technological at the same time. Unfortunately 3rd world
countries are lagging far behind in this arena. This study represents a brief demonstration on one of the VLSI
designing CAD tools known as MAGIC. The study includes a brief and precise direction from the software
installation to the way of IC fabrication with a design of CMOS inverter and its simulation as example. It
also includes why MAGIC should be the choice in academic purpose as well as industrial especially in 3rd
world countries, along with its limitations and superiority.

Key words: VLSI; Magic; CAD Tools; Designing CAD tools; Manhattan design; Cygwin/X; Tcl/Tk

1. INTRODUCTION designer to place colored polygons that represent


physical layers that form the complex circuitry on a
According to the low of Gordon Moore (1960), the chip [12]. MAGIC permits only Manhattan designs
number of transistors that can be placed on an (those whose edges are vertical or horizontal), i.e.
integrated circuit would be approximately double design strictly by rectangle shapes [5].
every two years [1]. This number has grown non-
linearly to a dramatically high value, which is about 2. INSTALLATION
two billion on a quad-core Itanium designed by
Intel in 2009 [2]. Still the number is significantly Most VLSI CAD tools are based on UNIX or Linux
increasing, and the growing sophistication of platforms [3]. Typically, MAGIC also runs under
applications continually adding new levels of Linux or UNIX. But most of the PC users use MS
complexity [1]. So it is needed to use CAD tools Windows platform [8]. In order to use MAGIC
that can do minimize the complexity and help to under Microsoft Windows, it needs some
improve the VLSI design. What CAD does is intermediate applications [3, 9], those take a bit
mainly automates the design process making it difficulty. First of all it is needed to install Cygwin
much easier. CADs are categorized on the basis of (an implementation of RedHat Linux) which is a set
works they handle like Design Entry tool, Analysis of powerful tools to assist developers in migrating
and Verification tools, Synthesis tools and so on applications from UNIX/Linux to the Microsoft
[1]. In this paper MAGIC is demonstrated, which is Windows platform [10]. Cygwin is a free open
a designing CAD tool for VLSI. source software. Other needed applications are
X11, and Tcl/Tk (together of Tcl & Tk). X11 is one
Magic is an interactive tool for creating and of the packages of Cygwin that makes an
modifying 2-D VLSI circuit layout. It is written by environment to open window(s) of the desired
John Ousterhout and his graduate students at UC application on Windows platform [9]. Tcl (Tool
Berkeley in 1980’s, and is widely known as the Command Language) is a very powerful dynamic
earliest tool used for circuit layout [7]. It allows the scripting language, and Tk (Toolkit) is a graphical

2
Corresponding Author: M.S.R. Shoaib,
E-mail: shoaibeee@gmail.com ISBN: 978-984-33-2140-4
user interface toolkit [11]. In this study the test is “grid” which is the unit of lambda (λ) that makes it
done in Windows 7 Ultimate and Windows XP SP2 possible to design towards the scalable technology.
using Cygwin/X (together of Cygwin & X11) Table 1, 2, 3, and 4 represent a description of some
v1.7.7-1, Tcl/Tk 8.5.0, and Magic 7.5.107v. useful commands for layout and post-fabrication
verifications.
2.1 Portability
After completing all installations the directory To start designing it is also important to know
“C:\Cygwin” (root directory for MAGIC defined by about Graphics Tools. Among 4 types of graphics
the MAGIC writer) is all that is needed. It can be tools in MAGIC (BOX tool, WIRING tool,
transferred to another PC for using MAGIC there. NETLIST tool, and RSIM tool) BOX tool is used
To do that, Cygwin directory is transferred to just most often (default in MAGIC), which is sufficient
“C:\” of another PC so that the path of root for basic designing [6]. The purpose of the BOX
directory remains as previous (C:\Cygwin). The tool is to specify a rectangular area of the layout for
directory can be compressed by making it a zip file editing. The left and right mouse buttons are used
for easier transfer. After transferring the Cygwin to position the box. Graphics tools can be changed
directory a shortcut of “C:\Cygwin\Cygwing.bat” is by pressing the spacebar with mouse pointing into
made in the new PC to its desktop. Icon path of the the layout window. Selected tool is used to show on
desktop shortcut is changed to the status bar in MAGIC (in figure 2).
“C:\Cygwin\Cygwin.ico”. Now all is set and Magic
can run as on previous PC.

2.2 Running Magic Fig 2: BOX tool selected in MAGIC 7.5


To run, Magic it is needed to run X-server first
(which is come after installing X11). To do that
Cygwin command window is opened form desktop.
3.1 Command Sets
Commands can be invoked in MAGIC in 4 ways:
To open X-server with multiwindow and nolock
by (I) typing long commands on the keyboard, (II)
features, “XWin –multiwindow –nolock” is entered
typing single-character macros on the keyboard,
in the command prompt. An X icon is supposed to
(III) pressing icons on toolbar in MAGIC and (IV)
appear on the task bar. Then the command window
pressing mouse buttons on the existing layout
is to be opened again (after closing or minimizing
paintings in the same window. All commands will
it). Finally just “magic” (to open Magic) is typed.
be invoked as long as the cursor is in the MAGIC
Two windows are supposed to appear; one is for
layout window creating or selecting a box to edit.
command and another is for layout (in figure 1).
Then Cygwin command window is kept minimized
Long commands are preceded by a semicolon ";" or
because closing this window will close the
colon ":", but it is not must. Commands can be
windows of Magic.
abbreviated [4]. Macros are used to be a single
lower case or upper case key stoke from keyboard.
Commands are case sensitive. Table 1, 2, 3, and 4
represent some commands with their descriptions.

Table 1: Some useful commands

Command Macro Description


Switches grid view
grid g
on or off.
Zooms in or out by a
zoom value
factor.
Zooms out by factor
zoom 0.5 z
2.
zoom 2 Z Zooms in by factor 2.
Shows the whole
Fig 1: MAGIC windows on Windows 7. view v drawing fit to
window.
3. DESIGNING BY MAGIC help command
Gives a brief of
specified command.
During layout designing in MAGIC, maintaining Gives a brief of all
help
the design rules are fairly easy with the use of commands.
Displays all current pdiffusion pdiff p+ source/drain
macro F2
Macros. brown brf areas.
Saves the design with polysilicon poly Gate oxide; slice of
save name given name and F3 polysilicon and
“.mag” extension. red p
silicide.
Saves all the metal1
save m1 F5 1st layer metal.
changes. blue
Loads name.mag into metal2
the window. If it is m2 F6 2nd layer metal.
purple
load name.mag doesn’t exist, Magic metal3 m3 F7 3rd layer metal.
creates a new empty m1 to nwell
layout field. nwcontact nnc
contact (tie).
quit Exits Magic. m1 to nwell
pwcontact ppc
contact (tie).
"Paint" can be abbreviated to "pai". To select the m1 to ndiff
entire area lies within the whole drawing "a" is ndcontact ndc F9
contact.
pressed after "s". Label name can be anything but in m1 to pdiff
practice it is necessary to label the supply wires pdcontact pdc F10
contact.
(nodes) as Vdd! and GND! exactly (the ! means polycontact pc F11 m1 to poly contact.
that the node spans the entire drawing by m2contact via F12 m2 to m1 contact.
electrically connecting, and it is global) [6]. m3contact via2 m3 to m2 contact.
ntransistor nfet Direct nMOS.
Table 2: Basic painting commands
ptransistor pfet Direct pMOS.
Command Mac Description
Layers’ name come with command "paint" to draw
paint layer Paints the defined layer
out or "erase" to erase out, like "paint ndiffusion" or
Selects area of cell in
"pai ndiff". In case of simple design "nwell" and
current layout. Toggles
select s "pwell" usually are not used in drawing, because
cells if there are more than
one connected. those are used to be automatically created when
".mag" file is converted into ".cif" file in MAGIC.
Creates and selects new
select more S topmost cell on the
existing layout. Table 4: Movement commands
Selects entire area of
select area a Command Description
selection.
Moves to defined
what Tells what’s selected. move direction
direction by 1λ.
Erases paint underneath
erase layer Moves to the defined
the box.
move direction value direction by given values
Deletes everything that’s
delete d of λ.
selected by "a".
move up 10 Upward moving by 10λ.
Rolls back to previous
undo u stretch direction "stretch" is similar to
status.
stretch direction "move" except that it
redo U Get back to current status.
value stretches and erases as it
Creates label for
stretch up 10 moves.
label name extraction and simulation
purpose usually. copy direction "copy" is similar to
copy direction value "move" except that a copy
Erases the label from
erase label of the selection is left
topmost cell of the box.
copy up 10 behind at the original
Erases all labels that lie
erase labels position.
within the area of the box.
Flips selection upside
upsidedown
down.
Table 3: Some basic common layers’ name
sideways Flips selection sideways.
Rotates selection
Layer Abbr Mac Description clockwise
clockwise by 90°
nwell nw pMOS substrate.
Rotates the selection
pwell pw nMOS substrate.
clockwise degrees clockwise by multiple of
ndiffusion ndiff n+ source/drain 90°.
F1
green gr areas.
Rotates the selection
rotate
counter clockwise by 90°.
Rotates the selection
rotate degrees counter clockwise by
multiple of 90°.
Makes matrix of selection
array Xvalue Yvalue
of x*y.
Makes matrix of selection
array 9 9
of 9*9.

The directions of move, stretch, and copy will be


up, down, left, and right only, and 8, 2, 4, 6 are the
macros of stretch for the directions respectively.
Macros "f" and "r" are used respectively instead of
"sideways" and "clockwise".

To invoke command from toolbar, it is needed to Fig 4: Schematic diagram of a CMOS inverter in
open the "Toolbar" from "Option" menu in the PSpice 9.1 Student Version (at left), and
layout window, then press the middle button (left corresponding layout in MAGIC 7.5 (at right)
and right button at a time for two button mouse) of
mouse on toolbar icon after creating a box (in The technology of VLSI depends mainly on the
figure 3). length of transistor channel, because it is the key to
optimize speed of an entire chip. Technology is the
process of silicon that is standardized by fabrication
facilities. The process composition is accepted by
design houses to use their electrical parameters.
The technology file consists of minimum
dimension of devices allowed by process, electrical
characteristics and on-silicon-spacing layout design
rules. The modern digital VLSI is preferred as
SCMOS (Scalable CMOS) technology because of
less power consumption and also cost of producing
it. MAGIC uses a lambda (λ) based architecture of
scalable layout designing system. Lambda is the
unit scale that is used to define the minimum
technology geometry increment on the die (a piece
of wafer), the processed silicon of the design layout
[6]. A square of the grids in MAGIC’s layout
Fig 3: MAGIC’s windows with toolbar (inside red window is one unit for lambda. The term “scalable”
rectangle) on Windows 7 means that designed layout can be modified with
the change of technology that is changing the value
To invoke command from existing painting the of lambda (λ). Default value of lambda in MAGIC
middle button (left and right button at a time for is 1.0µm for SUPERTEX 2 [6].
two button mouse) of mouse is to be pressed on any
painting in the layout that is to be painted in the 3.3 Design Rule Checking
box. Design rules specify how far apart various layers
must be, or how large various aspects of the layout
3.2 Starting Designing must be for successful fabrication. MOSIS SCMOS
According to top-down design abstraction of digital Design Rules specify the complete set of design
VLSI system, starting the implementation of a chip rules defined by the MOSIS VLSI fabrication
layout on MAGIC takes a necessity of schematic service [6]. Design Rule Checking is performed
circuit model [1]. Figure 4 shows the schematic automatically in MAGIC as long as DRC is
(left) and layout of a CMOS inverter in MAGIC checked on status bar in layout window (inside
(right), which makes more sense of this design green oval in figure 3). When error occurs, MAGIC
demonstration. Before starting with the layout a informs immediately by splattering small white
VLSI designer should know the basics of MAGIC dots around the area of concern. The command "drc
and starts from the technology file. why" or macro "?" tells the occurred error in
selection. Design Rule Checking can be off by
command "drc off" or un-checking DRC, and on by
command "drc on" or checking DRC.

In figure 4, "ndiff", "pdiff", "poly", "pc", "ndc",


"pdc", and "m1" layers are used to create an
inverter layout with their minimum width (3, 3, 2,
4, 4, 4, and 3λ respectively) keeping the minimum
distances between all of them with default
SUPERTEX 2.0µm process. The layout is saved as
"inverter" that creates "inverter.mag".

3.4 Simulation and Fabrication


After a circuit layout is drawn, it is needed to test
its performance by simulating it. To do that layout Fig 5: Simulation result of designed inverter in
has to be extracted to generate simulation PSpice 9.1 Student Version with 5 volt power
information needed to run simulation tools such as supply and input (at upper) with the corresponding
Spice or IRSIM. The command "extract" or "ext" output (at lower).
generates separate ".ext" (inverter.ext in this case)
file for ".mag" file. If the layout includes subcells Fabrication is the physical implementation of chip
then all subcells can be extracted by "extract all". according to designed layout. The most familiar
The "extract cellname" extracts a specified cell. The VLSI fabrication service is MOSIS (Metal-Oxide
extraction file of the designed inverter contains Semiconductor Interface Service), which supports
information like below: MAGIC. For fabrication ".mag" file has to be
converted into CIF (Caltech Intermediate Form) file
timestamp 1290837166 which is to be sent to the fabrication service to
version 7.5 manufacture. The command "cif" generates
tech scmos separate ".cif" (inverter.cif in this case) file for
style lambda=1.0(scna20_orb)
scale 1000 1 100 ".mag" file with the default style of lambda. To
resistclasses 26670 59550 23860 19690 27260 2000000 49 26 change the style of lambda for a different process
2505830 "cif istyle lambda=0.6(gen)" and "cif ostyle
node "0" 44 423 2 -7 ndc 19 18 0 0 0 0 0 0 0 0 0 0 25 22 0 0 0 0 lambda=0.6(gen)" commands have to be invoked
node "1" 72 423 -14 -7 pdc 0 0 30 22 0 0 0 0 0 0 0 0 33 26 0 0 0
0 before "cif" in case of 1.2µm process for example.
node "3" 272 5770 -16 -2 p 0 0 0 0 54 54 0 0 0 0 0 0 34 28 0 0 0 To open the generated CIF file command "cif read
0 inverter.cif" is to be invoked after "cif istyle
node "2" 116 1880 -14 0 pdiff 19 18 30 22 0 0 0 0 0 0 0 0 80 54 lambda=0.6(gen)" (this command is not needed if
0000
device mosfet nfet 2 -2 3 -1 2 3 "Gnd!" "3" 4 0 "0" 3 0 "2" 3 0 the default style is not being changed). Then to see
device mosfet pfet -14 -2 -13 -1 2 6 "Vdd!" "3" 4 0 "1" 6 0 "2" 6 the layout "s" > "a" > "x" (x to expand) macros are
0 to be invoked with mouse pointing into the layout
window.
Then "exttospice inverter.ext" generates
"inverter.spice" file for simulation using PSpice.
The conversion to PSpice from the “.ext” file is
4. JUSTIFICATION OF MAGIC
given below:
After all this demonstration above it is clearly seen
that MAGIC is very easy to use and understand.
* SPICE3 file created from inverter.ext - technology: scmos
Though the installation process is a little bit
M1000 2 3 1 Vdd pfet w=6u l=2u difficult, but once it is installed the portability
+ ad=30p pd=22u as=30p ps=22u makes it much flexible for further use. One of the
M1001 2 3 0 Gnd nfet w=3u l=2u significant features of MAGIC is that its design
+ ad=19p pd=18u as=19p ps=18u
style is based on Mead-Conway "scalable CMOS"
which means it uses "lambda-based" dimensions
C0 3 gnd! 5.8fF
which makes it easier to write technology file for
different manufactures. The most advanced feature
Latter the input signal is added to the PSpice file. of MAGIC is its liberal Berkeley open-source
Commands scripts to file for plotting and transient license [3]. MAGIC is not only a color painting tool
analysis are added to the file. Simulation plot is for layout but also it can provide additional
shown in figure 5. operations including Built-in Design-Rule-Check
(DRC), Built-in Hierarchical circuit extractor and
some other useful functions such as plowing tools
and routing tools for stretching and interconnecting
circuits respectively [3], those are not concerned 9. Magic VLSI Resource (2001),http://opencircuit
here because of keeping simplicity. design.com/cygwin/. 5 Septmber
10. Product view from RedHat.com, 2 September
Most VLSI layout designing software cost about 2010,http://www.redhat.com/services/custom
$10,000 (a simple student version of "Cadence" cygwin/
costs about $25,000), which is unaffordable for a 11. Tcl Developer Exchange. http://www.tcl.tk/. 3
university or small industry of 3rd world countries. Septeber 2010 Center of Neutron Research,
Stolen softwares are incomplete and prevent from http://www.ncnr.nist.gov/xtal/software/tclpkgs.
any updates for any latest technology. So, the cost html.
free legal license of MAGIC is the main advantage 12. Anil Bahuman, khaled Rasheed, Benjamin
in this case. Bishop. An Evolutionary Approch for VLSI
Standerd Cell Design. IEEE 2002.
5. CONCLUSION 13. Ousterhout, J., Hamachi, G., Mayo, R., Scott,
W. and Taylor, G., (1984), Magic: A VLSI
It is proposed that this study represents basic and Layout System, Proc. of 21st Design
most precise demonstration of MAGIC from its Automation Conference, pp. 152-159.
installation to fabrication of designed layout which
can be a perfect entrance to the world of VLSI
designing for the VLSI students or beginners of
VLSI design. Because it is not possible to develop
electronics sectors tremendously without VLSI, and
with an artistic and creative sense MAGIC could be
the platform that can make someone a successful
VLSI designer. Very important aspects of MAGIC
design i.e. lambda, DRC and extraction tools are
described here. An inverter was demonstrated and
simulated to confirm its operations. All necessary
commands used in MAGIC software are presented
here. Further study may be focused on full
functional low power custom chip design using
MAGIC, and advance demonstration of MAGIC.

REFERENCES
1. Wane Wolf, Modern VLSI Design, System-on-
chip Design, 3rd edition, pp. 2, 7, 27-29.
2. Intel Corporation, (2010) The Intel® Itanium
Processor 9300 Series: A Technical Overview
for IT Decision-Makers, White Paper, February
3. L. Jin, C. Liu and M. Anan, Dept. of Electrical
and Computer Engineering, Purdue University
Calumet, Hammond USA. Open-Source VLSI
CAD Tools: A Comparative Study.
4. Mayo, R. N., Arnold M. H., W.S. Scott, D. and
Hamachi G.T., (and J. Ousterhout) Reduced
Magic Tutorial from “WRL Research Report
DECWRL/ Livermore Magic Release”.
5. John Ousterhout, Magic Tutorial #1: Getting
Started, Computer Science Division, Electrical
Engineering and Computer Sciences,
University of California, Berkeley, CA 94720.
6. Jeffrey Wilinski. An Introduction to the
MAGIC VLSI Design Layout System.
7. Magic VLSI resource. 29 Aug 2010.
http://www.opencircuitdesign.com/magic/
8. OS platform statistics from w3schools.
http://www.w3schools.com/browsers/browsers
_os.asp. 29 August 2010.

You might also like