[Magic-dev] MAGIC: calculate selected area

R. Timothy Edwards tim.edwards at multigig.com
Mon Feb 27 10:32:16 EST 2006


Dear Jason,

> I would like to calculate the area of a selected region for capacitance
> modeling. Is there a feature to do this operation? Or does anyone have a
> script for this function?

I don't have a script, but I can tell you the general idea.  You can
select an entire net, then use "select save" to save the single net as
its own subcell.  Then, load that subcell, and extract it.  The ".ext"
file generated will contain a list of areas and perimeters, broken up
into "resist classes" (groups of types which share the same resistivity),
on the "node" line.  Since you're a Perl freak, you should find it a
trivial matter to write a perl script to parse the .ext file for the
"node" line and sum up the areas and perimeters.

> I've tried to modify the colors for something that has a little more
> contrast than the gray background. I tried editing the mos.24bit.dstyle
> and mos.24bit.std.cmap locate in the /usr/local/lib/magic/sys directory,
> but that appears to have no effect. I'm using Linux Redhat 9. Should I
> be editing some other file? Anybody have a color scheme with a black
> background they would like to share?

I think a lot of people use Magic just because they can't stand Cadence's
black background, which is bound to cause layout engineers to eventually
go blind, go crazy, or both.  But, chacon a son gout. . .

Assuming that you're using 24 bit plane graphics, the files that you're
editing are the correct ones.  Magic will report what visual it's using
on startup.  If you use the OpenGL interface, different style and colormap
files are used, and if your video card supports 8-bit overlays, then
magic will use the 7-bit style and colormap files.

Changing the first color ("background_gray") of mos.24bit.std.cmap to
"0 0 0 0" will turn the background black.  The "-m" switch to magic
allows you to substitute an alternative colormap ("-m std" being
equivalent to the default).

> BTW: love the TCL script interface. makes life loads easier to automate
> tasks. I'm a PERL-head(certified addict). Anybody use perl with magic
> instead of TCL? If so, any tips on setting up perl with magic?

The original development effort was supposed to use SWIG and be
possible to compile for Tcl, Perl, or Python.  However, the graphics
interface made it difficult to keep supporting all three, so I chose
one, which happened to be Tcl.  If you want it embedded, look at
Rajit's SCHEME interpreter implementation (mostly in the "lisp"
subdirectory).  An embedded interpreter is easier to implement, but an
interpreter extension is much more flexible.

					Regards,
					Tim

+--------------------------------+-------------------------------------+
| Dr. R. Timothy Edwards (Tim)   | email: tim.edwards at multigig.com     |
| MultiGiG, Inc.                 | web:   http://www.multigig.com      |
| 100 Enterprise Way, Suite A-3  | phone: (831) 621-3283               |
| Scotts Valley, CA 95066        | cell:  (240) 401-0616               |
+--------------------------------+-------------------------------------+



More information about the magic-dev mailing list