0% found this document useful (0 votes)
169 views6 pages

Magic Cheatsheet

The Magic VLSI Cheatsheet provides a compilation of useful Tcl commands, key bindings, and mouse operations for the Magic 8.3 layout tool. It includes commands for tasks such as adding paths, running checks, and manipulating layers, along with keyboard shortcuts for efficient navigation and editing. Additionally, it offers mouse operation guidelines for various tool modes to enhance user experience.

Uploaded by

akumarpv2020
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
169 views6 pages

Magic Cheatsheet

The Magic VLSI Cheatsheet provides a compilation of useful Tcl commands, key bindings, and mouse operations for the Magic 8.3 layout tool. It includes commands for tasks such as adding paths, running checks, and manipulating layers, along with keyboard shortcuts for efficient navigation and editing. Additionally, it offers mouse operation guidelines for various tool modes to enhance user experience.

Uploaded by

akumarpv2020
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Magic VLSI Cheatsheet

Harald Pretl
Institute for Integrated Circuits, Johannes Kepler University Linz

© 2021–2022

This cheat sheet compiles useful commands (to be entered in the Tcl console) and
bind keys (in the layout window) as well as a summary of the mouse operations
for the different tool modes. This compilation relates to Magic 8.3 (see https:
//github.com/RTimothyEdwards/magic).
A comprehensive Magic documentation and description of all macros can be
found at http://opencircuitdesign.com/magic/userguide.html.
The command macro layout in the Magic Tcl console lists all defined macros.

1
Useful commands:
addpath [path] add search path of cells
antennacheck run antenna check on cell
array xsize ysize array the selection xsize-times in X, ysize-times in Y,
spacing by box
box [options] print information about the box like b, or manipulate it
in various ways
cif [options] powerful command with various options (like generat-
ing mask layers, calculate density, etc.). Consult online
help.
contact type create contact inside box of intersecting layers
copy [to x y] copy to current cursor position or to x /y-position
corner dir1 dir2 draws a corner inside box, first in dir1, then in dir2
(cf. fill)
drc find locate DRC error
drc why explain DRC errors in box
dump cell copy given cell into current layout cell
erase layers erase comma-separated list of layers in box
erase * all layers but not labels
erase $ erase everything (like CTRL-D)
erase labels erase selected label(s) in box
fill dir extend layers from one side of box to the other in the
given dir ection (cf. corner)
findlabel label center the box on the label
flatten cell flatten the current edit cell incl. hierarchy into a new
cell
flush revert edit cell to last state on disk
get cell instantiate cell into current edit cell
goto nodename move box to net nodename, throw error if not existing
help [pattern] shows help for various commands
identify cell-id name the selected cell as cell-id
iroute interactive point-to-point router, from cursor to box
label string [position create a point, line or box label
[layer ]]
load cell open the cell in the layout window

2
Useful commands (cont’d):
macro [window_type] new macro definition
[key [value]]
measure [hor|ver|auto] create a ruler in the box
move x y move the selection to the x,y coordinate, or relative
by specifying direction and distance; parameters are in
lambda or in um
paint layers paint the comma-separated list of layers in box
plot type filename plots a layout, either as pnm or svg type
plow dir move layout structures incl. connectivity in dir ection,
see manual
port make create a port from selected label
port index number assign a port index (must match the number from
schematic)
quit [-nocheck] exit magic (using -nocheck discards unsaved changes)
see [no] layers show or hide comma-separated list of layers
see [no] * show or hide all layers
select save file Save selection as new file.mag
select short label1 Find the path that electrically connects (shorts) the
label2 nodes labeled label1 and label2.
straighten dir try to repair jogs by pulling in dir ection
tool changes the currently used tool to (box, wiring, netlist,
pick)
redraw redraws the window
unmeasure remove all rulers in box
what print information about the current selection
xload cell open the cell in the layout window unexpanded
xview full view, with unexpanded cells

3
Bind keys:
a select everything in box
A select additional objects in box
CTRL-A deselect objects in box
b print information about the box
B center window on the box
c copy
d delete selection
CTRL-D delete all layers and labels in box selected by cursor
e makes the selected cell the new edit cell
F flip the selection upside-down
g toggle grid
G toggle grid 2
i select instance under cursor
I select additional instance under cursor
CTRL-I deselect instance under cursor
m move selection to cursor position
o openwindow (with current selection)
r rotate 90 degree
R rotate -90 degree
s select objects under cursor
S select additional objects under cursor
CTRL-S deselect objects under cursor
u undo the last operation
U redo the last undo
v view, full view of layout
w writeall changed cells to disk
x expand cells (make visible) in box
X unexpand cells (hide) inside the box
CTRL-X toggle the visibility of cells in box
y drc why
z zoom out
Z zoom in
CTRL-Z zoom in on box
> edit the selected cell in layout window (cf. <)
< return from editing a cell (cf. >)
, clear selection
: directly jump to command window (like VI)
SPACE change the tool
SHIFT + SPACE change to the box tool
KEYPAD-2 move selection south, equivalent to ‘move s 1‘
SHIFT + KEYPAD-2 stretch selection south, equivalent to ‘stretch s 1‘
KEYPAD-4 move selection west, equivalent to ‘move w 1‘
SHIFT + KEYPAD-4 stretch selection west, equivalent to ‘stretch w 1‘
KEYPAD-6 move selection east, equivalent to ‘move e 1‘
SHIFT + KEYPAD-6 stretch selection east, equivalent to ‘stretch e 1‘
KEYPAD-8 move selection north, equivalent to ‘move n 1‘
SHIFT + KEYPAD-8 stretch selection north, equivalent to ‘stretch n 1‘

4
Bind keys (IIC add-on):
f full layout view
CTRL-F flip the selection sideways
k measure (ruler)
K remove rulers
p draw a wiring path
q open poperty dialog of p-cell
? show what is contained in box
= find DRC error(s) and zoom to it (thanks M. Guthaus)
0 show locali
! show metal-1
@ show metal-2
# show metal-3
$ show metal-4
% show metal-5
9 show all layers

5
Mouse operations:
Box tool:
LEFT set lower-left corner of box
RIGHT set upper-right corner of box
MIDDLE paint layer pointed with cursor in box
SHIFT + MIDDLE erase layer pointed with cursor in box
Layer selection tool:
LEFT show selected layer, cf. see
RIGHT hide selected layer, cf. see no
Wiring tool:
LEFT pick wire material and size from cursor
MIDDLE place wire at cursor
RIGHT cancel wire
SHIFT + LEFT change to higher layer (e.g. m1 to m2)
SHIFT + RIGHT change to lower layer (e.g. m2 to m1)
SHIFT + MIDDLE place a contact at cursor and continue on higher layer
Pick tool:
LEFT remove current selection and follow cursor
MIDDLE place a copy and continue
RIGHT cancel
SHIFT + MIDDLE make a copy of selection and follow cursor

You might also like