[Magic-dev] Re: Reading macros based on technology used

R. Timothy Edwards tim at opencircuitdesign.com
Sun Feb 3 11:30:58 EST 2008


Dear Bertrand,

>  I use several different technologies for which many of the macros are differents.
>  For instance, I have scmos1.tech for which I use scmos1.macros, scmos2.tech with
> scmos2.macros, etc... You get the idea :)
>  I there a construct I can use in the site.def to have scmos1.macros automatically
> read in when I invoke "magic -T scmos1.tech", scmos2.macros when I invoke
> "magic -T scmos2.tech" without requiring local .magicrc  ? Similarly, having a ".tcl"
> script read in on a per technology basis would be great. 

I tend to treat such script files as per-project, not per-technology,
and I put them in the project's .magicrc file.  This keeps the technology
file itself more portable, although it does require vigilance on the part
of the user or administrator to ensure that each new project is set up
correctly.

Putting something in the site.def file would account for whatever is
on the command line after the "-T" argument, but would not account for
technology files loaded from the .magicrc file with the "tech load"
command.  If one assumes that the .magicrc file will take care of
its own reading of script files, then the site.def file can do it by,
e.g.,

     catch {source [file root [tech filename]].tcl}

which will look for, and source (for example) file "scmos.tcl" after
reading "scmos.tech" (and assumes that scmos.tcl is in the same
directory as scmos.tech).

							---Tim

+--------------------------------+-------------------------------------+
| Dr. R. Timothy Edwards (Tim)   | email: tim at opencircuitdesign.com    |
| Open Circuit Design, Inc.	 | web:   http://opencircuitdesign.com |
| 22815 Timber Creek Lane        | phone: (301) 528-9364               |
| Clarksburg, MD 20871-4001      | cell:  (240) 401-0616               |
+--------------------------------+-------------------------------------+



More information about the magic-dev mailing list