[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: gEDA-user: Symbol Usage



On Tue, 5 Feb 2002, John Davies wrote:

> Hi All.

Hello John and others,
 
> I have been using gschem and gnetlist and would prefer not to edit any
> netlists that are created from gschem.  My thinking is that this could lead
> to errors in the simulation, etc.  Therefore I would like to be able to
> generate SPICE functions directly from the symbol.  The closest symbol
> available for my needs is the VCVS in the gschem SPICE library.  This
> produces a line in the netlist:-
> 
> Exx out+ out- in+ in- value
> 
> I can include anything I like in "value" since this is an attribute.  But
> what I would really like to do is change the netlist to:-
> 
> Exx out+ out- transformer in+ in- value
> 
> Transformer is just an example.  It could be "laplace" for filters, etc.
> There are many examples in SPICE where this type of netlist line is needed.
> 
> Any suggestions as to what I can do to the symbol to change it?

Changing the symbol won't help, changing the code in gnet-spice.scm is
part of the solution. I just copied a part of the pspice (7,x) manual with
controlling sources and found that there are several forms of the above
example. Berkeley spice has a separate non-linear source (B), the main
reason not to implement these pspice controlling sources.

Attaching attributes to a symbol and changing the scheme code that
generates the netlists is a solution. What about the proposed scheme
below?

Attaching attributes to symbols like this:
value=<gain>       (currently implemented) or
value=<expression>  

poly=<value>, value=<polynomial coefficients> or
poly=(<value>) = <polynomial coefficients>

table=<expression>, value=<input value, output value>  or 
table=<expression> = <input value, output value>

laplace=<expression>, value=<transform> or 
laplace=<expression> = <transform>

freq=<expression>, value=<frequency, magnitude, phase> <delay> or 
freq=<expression> = <frequency, magnitude, phase> <delay>

chebychev=<expression>, value=<transform> or 
chebychev=<expression> = <lp,hp,bp,br>,<cutoff frequency>, <attenuation>

The second form of poly, table, laplace, freq and chebychev is probably
the easiest method to attach attributes to a symbol. Now the node
reference used in the expressions, using '+' or '-' is impossible, these
math symbols are used to  generate the expressions. Referring to the
controlling node with 'plus' and 'minus' is better.

Another related topic:

I am unaware of all the different model parameters that the different
spice simulators accepts. For other components (e.g. BJT, MOSFET,
GaAsFET,... ) the scheme where you attach a list of attributes that can be
used to generate a spice netlist could be useful. E.g. attach an attribute
that contains a list of attributes that a model accepts. When the model
contains a valid attribute from the list it appears in the netlist.

For a MOSFET attach these attributes:
spiceattributelist=l w ad as pd ps nrd nrs nrg nrb
l=<value>
w=<value> 
pd=<value>
nrg=<value>

A example line of the generated netlist from the component with the above 
attributes:
M drain gate source bulk model l=<value> w=<value> pd=<value> nrg=<value> 

The attributes not present (ad, as, ps, nrd, nrs, nrb) are not netlisted.

Is this last example a useful addition to the gnetlist spice capabilities?
Are there better methods to implement the above feature?


> By the way, I am looking forward to trying gspice.
> 
> Best regards
> John Davies
> Metagence Technologies
> Home Park Estate, Kings Langley, Herts WD4 8LZ
> Tel: +44 (0)1923 260511 Fax: +44 (0)1923 268969


 Bas
--