[Magic-dev] Custom dstyle and cmap files

Graham Petley graham.petley at vlsitechnology.org
Wed Dec 12 09:05:17 EST 2007


Hallo Tim,

   I found custom styletypes work, but I don't think it's a good choice for me.
   Users who want to view my cells will need to use my custom tech file because
I use new layer synonyms and have an extra abutmentbox plane defined. This can
be done by loading Magic and calling the tech file from the command line:

$ magic -T ../../etc/pharosc -D xnr2v0x1

   The dstyle and cmap files are searched in the working directory and then in
install_dir/lib/magic/sys. If styletype mos is used and the files are missing
in the working directory, then the default files from install_dir/lib/magic/sys
are used. If I use styletype custom and the files are missing from the working
directory, then Magic chokes with messages like:

Couldn't open color map file "custom.24bit.std.cmap"
../../etc/pharosc.tech: line 117: section styles:
	Invalid style "67" for tile type ab
 ... more ...

   I can always copy my custom files to install_dir/lib/magic/sys but users of
my library may not realise that this is the solution to the error message
above. So I'm keeping my styletype mos so that even if my files are not found,
the default ones are and allow the cell to be viewed. Not very nicely, but
certainly better than nothing.

   What would be nice is the possibility to define

styles
	styletype custom mos

where the mos files would be used if the custom ones were not found.

Best regards, Graham Petley

--- "R. Timothy Edwards" wrote:

> Dear Graham,
> 
> >    I'm working on changing the colours and fill patterns for Magic. How can
> I
> > call custom dstyle and cmap files? The only way I have found is to have
> local
> > copies in the working directory, but this means duplicating the files.
> 
> I rewrote the code to make what you're doing easier, but I have not
> tested it exhaustively, so please let me know if it doesn't work as
> I describe it.
> 
> The default dstyle and cmap files are "mos.24bit.dstyle" and
> "mos.24bit.std.cmap" (or, if you prefer the OpenGL interface, like
> I do, it's "mos.OpenGL.dstyle" and "mos.OpenGL.std.cmap").  The
> initial "mos" is significant in that it corresponds directly to the
> line "styletype mos" in the techfile.  Prior to changes I made to
> version 7.3, changing the default would require intervention on the
> command line.  What I did in version 7.3 was to hold off loading the
> colormap and display style files until the techfile was being read,
> at which point the proper filenames would be derived from the
> "styletype" line in the "styles" section.
> 
> So (theoretically) what you want to do is to use your own unique
> styletype, e.g.,
> 
>     styles
>        styletype custom
> 
> corresponding to the files:
> 
>     custom.24bit.dstyle	  and
>     custom.24bit.std.cmap
> 
> If you're polite, you'll also provide the "7bit" and "OpenGL" style
> files and colormaps.  The load routines will look for the filenames
> in "SysLibPath", which can be altered using the "path sys" command.
> So instead of copying display and colormap files everywhere, you
> should be able to put them in some obvious place, then copy only
> a ".magicrc" file to every working directory, containing the "path
> sys +<directory>" command, followed by "tech load <techfile> -noprompt".
> 
> And once again, let me know if you are not seeing the behavior as
> advertised.
> 
> 					Regards,
> 					Tim



More information about the magic-dev mailing list