Debian Codegraph @

doc/html/cellname.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>cellname</H2>
22 <HR>
23 Operations on cell definitions.
24 <HR>
25
26 <H3>Usage:</H3>
27 <BLOCKQUOTE>
28 <B>cellname</B> <I>option</I> <BR><BR>
29 <BLOCKQUOTE>
30 where <I>option</I> is one of the following:
31 <DL>
32 <DT> [<B>list</B>] <B>children</B> [<I>name</I>]
33 <DD> List all of the children definitions of cell <I>name</I>,
34 or the children of the currently selected cell instance.
35 <DT> [<B>list</B>] <B>parent</B> [<I>name</I>]
36 <DD> List the parent cell definition of cell <I>name</I>,
37 or the parent of the currently selected cell instance.
38 <DT> [<B>list</B>] <B>exists</B>|<B>self</B> [<I>name</I>]
39 <DD> Returns the name of the cell if the cell exists, or false
40 (0) if the cell does not exist (is not loaded into the
41 database; the cell may still exist on disk). If <I>name</I>
42 is not present, returns the name of the currently selected
43 cell.
44 <DT> [<B>list</B>] <B>allcells</B>
45 <DD> List all of the cells in the database. Note that expansion
46 is not automatic, so cells that are not expanded are not
47 searched.
48 <DT> [<B>list</B>] <B>topcells</B>
49 <DD> List the name of the top-level cell or cells. Note that
50 the cells are searched in the whole database, so multiple
51 cells may be returned, regardless of what cell is the
52 topmost cell in the layout window. For that, use
53 <B>cellname window</B> (see below).
54 <DT> [<B>list</B>] <B>window</B>
55 <DD> List the name of the topmost cell in the window. If only
56 one window exists, it is implicit. If more than one
57 window exists, the command operates on the window from
58 which the command was called if the "<TT>:</TT>" macro
59 was used to invoke the command. Otherwise, the window
60 can be specified as the command (q.v. <I>tk_path_name</I>).
61 <DT> <B>create</B> <I>name</I>
62 <DD> Create a new cell definition with name <I>name</I>. This
63 is most often used with scripts, where it is not necessary
64 or desirable to load the cell into the window. Note that
65 this command does not search the layout search path for a
66 cell named <I>name</I>.mag, so it can be used to replace
67 a cell which exists on disk but is not currently loaded.
68 <DT> <B>rename</B> <I>name newname</I>
69 <DD> Change the name of the cell definition <I>name</I> to
70 <I>newname</I>.
71 <DT> <B>delete</B> <I>name</I>
72 <DD> Delete the cell definition with name <I>name</I>. If cell
73 <I>name</I> is a descendent of another cell, the command
74 will be prohibited. If the cell <I>name</I> is currently
75 the topmost cell in the window, the window will be loaded
76 with default cell "(UNNAMED)".
77 <DT> <B>flags</B>
78 <DD> Reports flag settings for the cell. Flags which are reported
79 are "available", "modified", and "readonly". Flag "available"
80 is true if the cell has been loaded into the database. Flag
81 "modified" is true if layout changes have been made to the
82 cell. Flag "readonly" is true if the cell has been locked to
83 prevent edits.
84 <DT> <B>writeable</B> [<B>true</B>|<B>false</B>]
85 <DD> Option <B>writeable false</B> makes the current cell
86 read-only and therefore prevents any edits from being
87 written to disk. If magic is compiled with file-locking,
88 then any advisory lock on the file is released.
89 Option <B>writeable true</B> makes the current cell read-write.
90 If magic is compiled with file-locking, then magic attempts
91 to grab an advisory lock on the file. If a lock is already
92 held on the file, then the command cannot be executed, and the
93 cell remains read-only. Option <B>writeable</B> with no other
94 arguments returns the state of the cell (roughly equivalent to
95 <B>cellname flags readonly</B>).
96 </DL>
97 </BLOCKQUOTE>
98 </BLOCKQUOTE>
99
100 <H3>Summary:</H3>
101 <BLOCKQUOTE>
102 The <B>cellname</B> command performs various operations on
103 cell definitions. For the first four options listed above,
104 <B>cellname</B> lists cells by their relationship to cell
105 <I>name</I>, or to the current selection if no <I>name</I>
106 is given. The optional argument <B>list</B> returns the
107 result as a list. In particular, in the Tcl version of
108 magic, this list is a Tcl result that may be operated on
109 by Tcl procedures.
110 </BLOCKQUOTE>
111
112 <H3>Implementation Notes:</H3>
113 <BLOCKQUOTE>
114 <B>cellname</B> is implemented as a built-in function in <B>magic</B>
115 The Tcl version of magic returns Tcl results when the "<B>list</B>"
116 option is present. <B>instance</B> is essentially an alias for the
117 <B>cellname</B> command, and takes the same options, but references
118 are to cell instances rather that cell definitions (q.v.). <P>
119
120 The command option <B>cellname list exists</B> is nonsensical from
121 the standpoint of the end-user (if the cell is selected, of course
122 it exists). However, it is a very useful function for Tcl scripts
123 to determine the name of the cell that is currently selected. <P>
124
125 The <B>cellname</B> command replaces a number of commands that
126 briefly appeared in version 7.1, such as <B>parent</B>,
127 <B>child</B>, and <B>top</B>. These commands are now options
128 of the <B>cellname</B> and <B>instance</B> commands.
129 </BLOCKQUOTE>
130
131 <H3>See Also:</H3>
132 <BLOCKQUOTE>
133 <A HREF=instance.html><B>instance</B></A> <BR>
134 <A HREF=load.html><B>load</B></A> <BR>
135 <A HREF=tk_path_name.html><I>tk_path_name</I></A> <BR>
136 </BLOCKQUOTE>
137
138 <P><IMG SRC=graphics/line1.gif><P>
139 <TABLE BORDER=0>
140 <TR>
141 <TD> <A HREF=commands.html>Return to command index</A>
142 </TR>
143 </TABLE>
144 <P><I>Last updated:</I> December 4, 2005 at 5:38pm <P>
145 </BODY>
146 </HTML>