Hello David,
Hagen is right now writing an autogenerator for generating standard cells. He would like to have some spec for the Magic file format. Do you have something like that flying around?
There is---it's in the manual pages installed with magic ("man magic") and those manual pages are also available in the online documentation.
However, I strongly discourage generating a .mag file output directly. Instead, create the database file by creating a script of commands that generate the device, and then run that script in batch. The commands are also in the online documentation, although the best reference is to look at the PDK device generating script:
http://opencircuitdesign.com/magic/archive/scmos_rev1.tcl
In particular, look at how "scmos::nfet_draw" is defined. You don't need to define procedures if your autogenerator is calculating all the dimensions, just use "box values" and "paint" commands, and "label" and "port" to define the ports. Then use "lef write" to let magic automatically generate all the LEF files. Finally, there's no need to write .mag files at all. Generate the layout with box and paint commands, then write GDS. ---Tim
+--------------------------------+-------------------------------------+ | R. Timothy Edwards (Tim) | email: tim@opencircuitdesign.com | | Open Circuit Design | web: http://opencircuitdesign.com | | 19601 Jerusalem Road | phone: (240) 489-3255 | | Poolesville, MD 20837 | cell: (408) 828-8212 | +--------------------------------+-------------------------------------+