2017-04-25 14:41:48 +02:00
|
|
|
<HTML>
|
|
|
|
|
<HEAD>
|
|
|
|
|
<STYLE type="text/css">
|
|
|
|
|
H1 {color: black }
|
|
|
|
|
H2 {color: maroon }
|
|
|
|
|
H3 {color: #007090 }
|
|
|
|
|
A.head:link {color: #0060a0 }
|
|
|
|
|
A.head:visited {color: #3040c0 }
|
|
|
|
|
A.head:active {color: white }
|
|
|
|
|
A.head:hover {color: yellow }
|
|
|
|
|
A.red:link {color: red }
|
|
|
|
|
A.red:visited {color: maroon }
|
|
|
|
|
A.red:active {color: yellow }
|
|
|
|
|
</STYLE>
|
|
|
|
|
</HEAD>
|
2024-01-09 22:37:00 +01:00
|
|
|
<TITLE>Magic-8.3 Command Reference</TITLE>
|
2017-04-25 14:41:48 +02:00
|
|
|
<BODY BACKGROUND=graphics/blpaper.gif>
|
2024-01-09 22:37:00 +01:00
|
|
|
<H1> <IMG SRC=graphics/magic_title8_3.png ALT="Magic VLSI Layout Tool Version 8.3">
|
2017-04-25 14:41:48 +02:00
|
|
|
<IMG SRC=graphics/magic_OGL_sm.gif ALIGN="top" ALT="*"> </H1>
|
|
|
|
|
|
|
|
|
|
<H2>cellname</H2>
|
|
|
|
|
<HR>
|
|
|
|
|
Operations on cell definitions.
|
|
|
|
|
<HR>
|
|
|
|
|
|
|
|
|
|
<H3>Usage:</H3>
|
|
|
|
|
<BLOCKQUOTE>
|
|
|
|
|
<B>cellname</B> <I>option</I> <BR><BR>
|
|
|
|
|
<BLOCKQUOTE>
|
|
|
|
|
where <I>option</I> is one of the following:
|
|
|
|
|
<DL>
|
|
|
|
|
<DT> [<B>list</B>] <B>children</B> [<I>name</I>]
|
|
|
|
|
<DD> List all of the children definitions of cell <I>name</I>,
|
|
|
|
|
or the children of the currently selected cell instance.
|
2022-01-21 16:44:13 +01:00
|
|
|
<DT> [<B>list</B>] <B>childinst</B> [<I>name</I>]
|
|
|
|
|
<DD> List all of the children instances of cell <I>name</I>,
|
|
|
|
|
or the children of the currently selected cell instance.
|
2017-04-25 14:41:48 +02:00
|
|
|
<DT> [<B>list</B>] <B>parent</B> [<I>name</I>]
|
|
|
|
|
<DD> List the parent cell definition of cell <I>name</I>,
|
|
|
|
|
or the parent of the currently selected cell instance.
|
|
|
|
|
<DT> [<B>list</B>] <B>exists</B>|<B>self</B> [<I>name</I>]
|
|
|
|
|
<DD> Returns the name of the cell if the cell exists, or false
|
|
|
|
|
(0) if the cell does not exist (is not loaded into the
|
|
|
|
|
database; the cell may still exist on disk). If <I>name</I>
|
|
|
|
|
is not present, returns the name of the currently selected
|
|
|
|
|
cell.
|
|
|
|
|
<DT> [<B>list</B>] <B>allcells</B>
|
|
|
|
|
<DD> List all of the cells in the database. Note that expansion
|
|
|
|
|
is not automatic, so cells that are not expanded are not
|
|
|
|
|
searched.
|
|
|
|
|
<DT> [<B>list</B>] <B>topcells</B>
|
|
|
|
|
<DD> List the name of the top-level cell or cells. Note that
|
|
|
|
|
the cells are searched in the whole database, so multiple
|
|
|
|
|
cells may be returned, regardless of what cell is the
|
|
|
|
|
topmost cell in the layout window. For that, use
|
|
|
|
|
<B>cellname window</B> (see below).
|
|
|
|
|
<DT> [<B>list</B>] <B>window</B>
|
|
|
|
|
<DD> List the name of the topmost cell in the window. If only
|
|
|
|
|
one window exists, it is implicit. If more than one
|
|
|
|
|
window exists, the command operates on the window from
|
|
|
|
|
which the command was called if the "<TT>:</TT>" macro
|
|
|
|
|
was used to invoke the command. Otherwise, the window
|
|
|
|
|
can be specified as the command (q.v. <I>tk_path_name</I>).
|
|
|
|
|
<DT> <B>create</B> <I>name</I>
|
|
|
|
|
<DD> Create a new cell definition with name <I>name</I>. This
|
|
|
|
|
is most often used with scripts, where it is not necessary
|
|
|
|
|
or desirable to load the cell into the window. Note that
|
|
|
|
|
this command does not search the layout search path for a
|
|
|
|
|
cell named <I>name</I>.mag, so it can be used to replace
|
|
|
|
|
a cell which exists on disk but is not currently loaded.
|
|
|
|
|
<DT> <B>rename</B> <I>name newname</I>
|
|
|
|
|
<DD> Change the name of the cell definition <I>name</I> to
|
|
|
|
|
<I>newname</I>.
|
Made a fairly major overhaul to the toolkit for generated devices.
The main changes are:
(1) Changed the hash function used to generate the 6-character
suffix for generated device cell names. The original hash
function is not good for ensuring unique names, and can
cause cell name collisions (two different parameter sets
having the same cell name). The chance of name collisions
should now be diminishingly small.
(2) Modified the string passed to the hash:
(A) Ordered the parameter names alphabetically, since iterating
through dictionary keys is not guaranteed to be in any
specific order, leading to different strings for the same
parameter set
(B) Normalized numerical parameters, so that "2", "2.0", "2e0"
are all hashed the same, again to avoid having multiple
cell names for the same set of parameters.
(3) Fixed a problem in which when changing parameters for a cell
instance, the instance would become unselected and the instance
name would be lost and revert to magic's auto-generated name.
(4) Fixed the annoyance of having a pop-up dialog whenever magic
decides that a parameterized cell name is not being used anywhere,
and it can safely delete the cell.
(5) Fixed an issue where the check for whether a cell can be deleted
is not run consistently.
The result is, I hope, a much more pleasant experience with generated
cells.
2026-04-02 23:13:17 +02:00
|
|
|
<DT> <B>delete</B> <I>name</I> [<B>-noprompt</B>]
|
2017-04-25 14:41:48 +02:00
|
|
|
<DD> Delete the cell definition with name <I>name</I>. If cell
|
|
|
|
|
<I>name</I> is a descendent of another cell, the command
|
|
|
|
|
will be prohibited. If the cell <I>name</I> is currently
|
|
|
|
|
the topmost cell in the window, the window will be loaded
|
Made a fairly major overhaul to the toolkit for generated devices.
The main changes are:
(1) Changed the hash function used to generate the 6-character
suffix for generated device cell names. The original hash
function is not good for ensuring unique names, and can
cause cell name collisions (two different parameter sets
having the same cell name). The chance of name collisions
should now be diminishingly small.
(2) Modified the string passed to the hash:
(A) Ordered the parameter names alphabetically, since iterating
through dictionary keys is not guaranteed to be in any
specific order, leading to different strings for the same
parameter set
(B) Normalized numerical parameters, so that "2", "2.0", "2e0"
are all hashed the same, again to avoid having multiple
cell names for the same set of parameters.
(3) Fixed a problem in which when changing parameters for a cell
instance, the instance would become unselected and the instance
name would be lost and revert to magic's auto-generated name.
(4) Fixed the annoyance of having a pop-up dialog whenever magic
decides that a parameterized cell name is not being used anywhere,
and it can safely delete the cell.
(5) Fixed an issue where the check for whether a cell can be deleted
is not run consistently.
The result is, I hope, a much more pleasant experience with generated
cells.
2026-04-02 23:13:17 +02:00
|
|
|
with default cell "(UNNAMED)". If option <B>-noprompt</B>
|
|
|
|
|
is specified, then the actions specified above happen
|
|
|
|
|
immediately. Otherwise, a dialog box will be raised
|
|
|
|
|
asking for confirmation to delete the cell.
|
2022-01-21 16:44:13 +01:00
|
|
|
<DT> <B>dereference</B> <I>name</I>
|
|
|
|
|
<DD> Perform a flush of the cell (per the "<B>flush</B>" command),
|
|
|
|
|
first removing any file path associated with the cell, so
|
|
|
|
|
that the cell will be reloaded from the first valid location
|
|
|
|
|
found using the search paths.
|
2017-04-25 14:41:48 +02:00
|
|
|
<DT> <B>flags</B>
|
|
|
|
|
<DD> Reports flag settings for the cell. Flags which are reported
|
|
|
|
|
are "available", "modified", and "readonly". Flag "available"
|
|
|
|
|
is true if the cell has been loaded into the database. Flag
|
|
|
|
|
"modified" is true if layout changes have been made to the
|
|
|
|
|
cell. Flag "readonly" is true if the cell has been locked to
|
|
|
|
|
prevent edits.
|
2022-01-21 16:44:13 +01:00
|
|
|
<DT> <B>timestamp</B> <I>name</I> [<I>value</I>]
|
|
|
|
|
<DD> Reports or sets the cell timestamp value. Note that timestamps
|
|
|
|
|
should be handled automatically, so setting the timestamp is
|
|
|
|
|
discouraged outside of limited functions like creating cell
|
|
|
|
|
libraries. The timestamp is in the usual integer format and
|
|
|
|
|
can be printed as a human-readable date using the Tcl <B>clock</B>
|
|
|
|
|
command, e.g., "<TT>clock format [cellname timestamp]</TT>".
|
|
|
|
|
<DT> <B>filepath</B> <I>name</I> [<B>default</B>|<I>pathname</I>]
|
|
|
|
|
<DD> With no option, this command returns the path to the file
|
|
|
|
|
for the cell <I>name</I>, or the keyword "<B>default</B>"
|
|
|
|
|
if the cell is not associated with a specific file path.
|
|
|
|
|
With option "<B>default</B>", if the cell is associated
|
|
|
|
|
with a specific file path, that association is removed.
|
|
|
|
|
With option "<I>pathname</I>", the cell is associated with
|
|
|
|
|
the given file path. Note that this is meant to be used
|
|
|
|
|
to resolve issues with database libraries being moved
|
|
|
|
|
from one location or another. More typically, the
|
|
|
|
|
"<B>save</B>" command should be used to create a copy
|
|
|
|
|
of the (possibly modified) cell in a new location. Changing
|
|
|
|
|
the filepath will not perform any disk reads or writes.
|
|
|
|
|
<DT> <B>writeable</B> <I>name</I> [<B>true</B>|<B>false</B>]
|
2017-04-25 14:41:48 +02:00
|
|
|
<DD> Option <B>writeable false</B> makes the current cell
|
|
|
|
|
read-only and therefore prevents any edits from being
|
|
|
|
|
written to disk. If magic is compiled with file-locking,
|
|
|
|
|
then any advisory lock on the file is released.
|
|
|
|
|
Option <B>writeable true</B> makes the current cell read-write.
|
|
|
|
|
If magic is compiled with file-locking, then magic attempts
|
|
|
|
|
to grab an advisory lock on the file. If a lock is already
|
|
|
|
|
held on the file, then the command cannot be executed, and the
|
|
|
|
|
cell remains read-only. Option <B>writeable</B> with no other
|
|
|
|
|
arguments returns the state of the cell (roughly equivalent to
|
|
|
|
|
<B>cellname flags readonly</B>).
|
|
|
|
|
</DL>
|
|
|
|
|
</BLOCKQUOTE>
|
|
|
|
|
</BLOCKQUOTE>
|
|
|
|
|
|
|
|
|
|
<H3>Summary:</H3>
|
|
|
|
|
<BLOCKQUOTE>
|
|
|
|
|
The <B>cellname</B> command performs various operations on
|
|
|
|
|
cell definitions. For the first four options listed above,
|
|
|
|
|
<B>cellname</B> lists cells by their relationship to cell
|
|
|
|
|
<I>name</I>, or to the current selection if no <I>name</I>
|
|
|
|
|
is given. The optional argument <B>list</B> returns the
|
|
|
|
|
result as a list. In particular, in the Tcl version of
|
|
|
|
|
magic, this list is a Tcl result that may be operated on
|
|
|
|
|
by Tcl procedures.
|
|
|
|
|
</BLOCKQUOTE>
|
|
|
|
|
|
|
|
|
|
<H3>Implementation Notes:</H3>
|
|
|
|
|
<BLOCKQUOTE>
|
|
|
|
|
<B>cellname</B> is implemented as a built-in function in <B>magic</B>
|
|
|
|
|
The Tcl version of magic returns Tcl results when the "<B>list</B>"
|
|
|
|
|
option is present. <B>instance</B> is essentially an alias for the
|
|
|
|
|
<B>cellname</B> command, and takes the same options, but references
|
|
|
|
|
are to cell instances rather that cell definitions (q.v.). <P>
|
|
|
|
|
|
|
|
|
|
The command option <B>cellname list exists</B> is nonsensical from
|
|
|
|
|
the standpoint of the end-user (if the cell is selected, of course
|
|
|
|
|
it exists). However, it is a very useful function for Tcl scripts
|
|
|
|
|
to determine the name of the cell that is currently selected. <P>
|
|
|
|
|
|
|
|
|
|
The <B>cellname</B> command replaces a number of commands that
|
|
|
|
|
briefly appeared in version 7.1, such as <B>parent</B>,
|
|
|
|
|
<B>child</B>, and <B>top</B>. These commands are now options
|
|
|
|
|
of the <B>cellname</B> and <B>instance</B> commands.
|
|
|
|
|
</BLOCKQUOTE>
|
|
|
|
|
|
|
|
|
|
<H3>See Also:</H3>
|
|
|
|
|
<BLOCKQUOTE>
|
|
|
|
|
<A HREF=instance.html><B>instance</B></A> <BR>
|
|
|
|
|
<A HREF=load.html><B>load</B></A> <BR>
|
2022-01-21 16:44:13 +01:00
|
|
|
<A HREF=path.html><B>path</B></A> <BR>
|
|
|
|
|
<A HREF=flush.html><B>flush</B></A> <BR>
|
2017-04-25 14:41:48 +02:00
|
|
|
<A HREF=tk_path_name.html><I>tk_path_name</I></A> <BR>
|
|
|
|
|
</BLOCKQUOTE>
|
|
|
|
|
|
|
|
|
|
<P><IMG SRC=graphics/line1.gif><P>
|
|
|
|
|
<TABLE BORDER=0>
|
|
|
|
|
<TR>
|
|
|
|
|
<TD> <A HREF=commands.html>Return to command index</A>
|
|
|
|
|
</TR>
|
|
|
|
|
</TABLE>
|
2022-01-21 16:44:13 +01:00
|
|
|
<P><I>Last updated:</I> February 3, 2021 at 3:52pm <P>
|
2017-04-25 14:41:48 +02:00
|
|
|
</BODY>
|
|
|
|
|
</HTML>
|