Debian Codegraph @

doc/html/grid.html

raw symbols SCIP
1 <HTML>
2 <HEAD>
3 <STYLE type="text/css">
4 H1 {color: black }
5 H2 {color: maroon }
6 H3 {color: #007090 }
7 A.head:link {color: #0060a0 }
8 A.head:visited {color: #3040c0 }
9 A.head:active {color: white }
10 A.head:hover {color: yellow }
11 A.red:link {color: red }
12 A.red:visited {color: maroon }
13 A.red:active {color: yellow }
14 </STYLE>
15 </HEAD>
16 <TITLE>Magic-7.3 Command Reference</TITLE>
17 <BODY BACKGROUND=graphics/blpaper.gif>
18 <H1> <IMG SRC=graphics/magic_title2.gif ALT="Magic VLSI Layout Tool Version 7.3">
19 <IMG SRC=graphics/magic_OGL_sm.gif ALIGN="top" ALT="*"> </H1>
20
21 <H2>grid</H2>
22 <HR>
23 Toggle the grid lines on or off, and set grid parameters
24 <HR>
25
26 <H3>Shortcuts:</H3>
27 <BLOCKQUOTE>
28 Key macro <B>g</B> implements the command <B>grid</B> (with no arguments).
29 Key macro <B>G</B> implements the command <B>grid 2</B>.
30 </BLOCKQUOTE>
31
32 <H3>Usage:</H3>
33 <BLOCKQUOTE>
34 <B>grid</B> [<I>option</I>]<BR><BR>
35 <BLOCKQUOTE>
36 where <I>option</I> may be one of the following:
37 <DL>
38 <DT> <I>x_spacing</I> [<I>y_spacing</I> [<I>x_origin</I>
39 <I>y_origin</I>]]
40 <DD> set the grid to the indicated spacing, where all
41 spacing and origin values are any valid <B>magic</B>
42 <A HREF=distance.html><I>distance</I></A> value.
43 <DT> <B>on</B>|<B>off</B>
44 <DD> Set the visibility of the grid on or off, as indicated.
45 <DT> <B>state</B>
46 <DD> Report the state (on or off) of the grid. In the Tcl
47 version, this is returned as a boolean value (0 or 1).
48 <DT> <B>box</B>
49 <DD> Report the box (rectangle) of the unit grid, in magic
50 internal coordinates.
51 <DT> <B>help</B>
52 <DD> Print usage information on the <B>grid</B> command.
53 </DL>
54 </BLOCKQUOTE>
55 </BLOCKQUOTE>
56
57 <H3>Summary:</H3>
58 <BLOCKQUOTE>
59 The <B>grid</B> command has two purposes: to draw a reference grid
60 on the screen as an aid to layout placement, and to define a snap
61 grid of arbitrary (and not necessarily square) units. This second
62 use works in conjunction with the <B>snap</B> command; with the
63 invocation of <B>snap grid</B> (or, equivalently, <B>snap user</B>),
64 standard magic dimensions for commands such as <B>move</B>, <B>copy</B>,
65 <B>box</B>, <B>stretch</B>, and mouse-button movement of the cursor
66 box are parsed as integer divisions of the user grid. The grid does
67 not have to be visible ("<B>grid on</B>") for the snap function to be
68 enabled. <P>
69
70 Note that the grid has both spacing values and an offset; unlike the
71 lambda grid, which is always aligned to the internal coordinate system,
72 the user grid may be any value; for grid spacings that are not a
73 multiple of internal or lambda values, the grid may need to be
74 offset from the origin to get the desired alignment. To do this,
75 specify the <I>x_origin</I> and <I>y_origin</I> values, which
76 describe the offset of the grid origin from the internal coordinate
77 system origin. <P>
78
79 Usually there is no reason to have different <I>x_spacing</I> and
80 <I>y_spacing</I> values (only one spacing value is required for
81 both). However, occasionally it may be useful to define something
82 like the following:
83 <BLOCKQUOTE>
84 <B>grid 150um 3l; snap grid</B>
85 </BLOCKQUOTE>
86 This example makes it easy to draw a number of horizontal routing
87 lines aligned to a pad cell spacing of 150 microns. <P>
88
89 Note that even when the grid is set to visible, at a large enough
90 zoom factor, where the grid lines become dense, the grid will not
91 be drawn. <P>
92
93 <B>grid</B> with no arguments toggles the visibility of the grid
94 lines on the screen.
95 </BLOCKQUOTE>
96
97 <H3>Implementation Notes:</H3>
98 <BLOCKQUOTE>
99 <B>grid</B> is implemented as a built-in window command in <B>magic</B>.
100 </BLOCKQUOTE>
101
102 <H3>See Also:</H3>
103 <BLOCKQUOTE>
104 <A HREF=snap.html><B>snap</B></A> <BR>
105 </BLOCKQUOTE>
106
107 <P><IMG SRC=graphics/line1.gif><P>
108 <TABLE BORDER=0>
109 <TR>
110 <TD> <A HREF=commands.html>Return to command index</A>
111 </TR>
112 </TABLE>
113 <P><I>Last updated:</I> November 7, 2004 at 3:24pm <P>
114 </BODY>
115 </HTML>