Dear Svenn,

> I want to use xcircuit for some spectre netlisting, and I have to add
> a whole lot of expressions as m and as ad and the other physical
> parameters are calculated. How should I do this efficiently?

I do wholesale creation of parameter lists so rarely that there's no
method for handling it in the GUI.  The best way to deal with it is
to make all the component symbols you need, save the library, then
text-edit the library and add the parameters.  Parameters are simply
postscript key-value pairs in an in-line dictionary, which is specified
by enclosing the list in << ... >>.  Keys are postscript strings, so
they start with "/".  When I write out a library from xcircuit, I
add the character "@" after the slash but before the parameter name,
so as to avoid the pitfall of having parameter names shadow postscript
commands, but as long as you aren't shadowing a defined postscript
keyword, the "@" is optional.  Here's an example:

/SiGeNPN {
<</@subs (agnd) /@length (10.16u) /@width (0.2u) (lindex {0.2u 0.4u 0.6u} 0) pop
/@m 1 /@model (l2c2) (lindex {l l2 l3 l4 l5 l2c2 l3c2 l4c2 l5c2} 5) pop
/@index (?) /@class (Q) >> begingate
   .
   .
   .

In postscript, strings are enclosed with ( ... ), but xcircuit can
handle either strings or raw numbers (no enclosing parentheses),
either floating-point or integer (as above, for parameter "m").  It
is also possible to define parameters as Tcl expressions and to use
Tcl expressions to set up lists of specific choices for a parameter.
In the example above, selecting "width" (NPN emitter width) gives a
choice of .2, .4, or .5um (default .2), and selecing "model" also gives
a set of choices which are the valid SPICE models for the NPN.

The example above was from a library I made to match a Spectre library
of parts for a Jazz SiGe process.

                                        ---Tim

+--------------------------------+-------------------------------------+
| Dr. R. Timothy Edwards (Tim)   | email: [EMAIL PROTECTED]    |
| Open Circuit Design, Inc.      | web:   http://opencircuitdesign.com |
| 22815 Timber Creek Lane        | phone: (301) 528-9364               |
| Clarksburg, MD 20871-4001      | cell:  (240) 401-0616               |
+--------------------------------+-------------------------------------+
_______________________________________________
Xcircuit-dev mailing list
[email protected]
http://www.opencircuitdesign.com/mailman/listinfo/xcircuit-dev

Reply via email to