[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: gEDA-user: multiple attributes



On Jan 5, 2011, at 8:49 AM, Stephan Boettcher wrote:

> 
> Matthew Wilkins <matthew_m_wilkins@xxxxxxxx> writes:
> 
>> 
>> There _is_ a meaning to the order if a netlister expects only one
>> attribute, but the symbol has several of the same name.  In that case,
>> the netlister could find either the first attribute of that name or
>> the last, depending on how the netlister was written.
> 
> This should either case an error or a prominent warning.
> 
>> About overloading:
>> 
>> Sometimes it's desirable to overload attributes; for example I might
>> want to simulate a circuit through a spice netlister, then generate a
>> BOM of the parts in the simulation.  Having the BOM netlister use the
>> same "value" attributes as the simulation helps prevent errors in
>> keeping the two flows in sync.
>> 
>> To give the user the choice of overloading the symbols or not, each
>> netlister could first look for a netlister-specific attribute, and if
>> that doesn't exist then use a generic attribute.  i.e first look for
>> "spice-sdb-value", and if that doesn't exist then use the generic
>> "value".
> 
> And that is the way forward for the problematic overloading we have
> right now, e.g., the pinseq attribute:
> 
> The spice netlist shall learn to use a (spice-)port-order attribute, or
> however that shall be named, and fall back to pinseq, with an
> obsolescence warning.
> 
>  spice-port-order
>  port-order
>  pin-seq  (obsolete)

I'd prefer a spice-prototype attribute, which would allow us to avoid many of the difficulties without a confusing proliferation of attributes. For the symbol nmos-3.sym, a suitable prototype might be:

M? #D #G #S #S $model-name L= W= AS= AD= PS= PD= M=

We can yell at each other about syntax, but I think the basic idea is sound. Right now, spice-sdb is essentially reduced to guessing what the symbol represents. It can't always tell reliably (it's been know to decide my flip-flops are diodes!). There isn't generally one right answer: with a different kind of model (subcircuit), the prototype for nmos-3.sym might be:

X? #D #G #S $model-name

Suggested syntax:

First characters up to the "?" are the device prefix.

#x means the net attached to pinnumber x.
%x means the net attached to pinseq x.
`x means the net attached to pinlabel x.
$x means the value of attribute x.
x= means an optional x=value string to be emitted only if the x attribute is present.

An improved SPICE netlister could incorporate heuristics similar to spice-sdb to pick a prototype from a collection of defaults, or fall back purely on pinseq and model-name, if no spice-prototype attribute is present, for backward compatibility.

---
John Doty              Noqsi Aerospace, Ltd.

This message contains technical discussion involving difficult issues. No personal disrespect or malice is intended. If you perceive such, your perception is simply wrong. I'm a busy person, and in my business "go along to get along" causes mission failures and sometimes kills people, so I tend to be a bit blunt.



_______________________________________________
geda-user mailing list
geda-user@xxxxxxxxxxxxxx
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user