Re: [ng-spice-devel] Re: [ng-spice] [ng-spice-devel] a bit more
On Sat, 5 Feb 2000, Stephen Tell wrote:
> On Thu, 3 Feb 2000, Francesco Doni wrote:
>
> To sumarize, it sounds like you are talking about a sort of "interpreted"
> models in addition to compiled models. In the commercial spices, one can
> usually do somthing of this sort using subcircuits that contain various
> predefined models (resistors, etc) and dependent voltage or current
> sources that are controlled by arbitrary arithmetic expressions involving
> constants and voltage/current measurements at other nodes. I don't
> think a new language is necessary to implement your idea.
I think that Francesco wants to do something like XSPICE compiled model
support. You write a model with equations in C (e,g.) using a set of
extension api. The model may be eventually written in C and interpreted by
a C interpreter and only after debug process compiled. Franz ?
> Implementing these expression-controlled sources in a compatible way would
> be a start. For greater utility, two enhancements come to mind.
There is a structure called "Parse tree" that can be associated to spice
structures. I think that is possible to let the parser use this stucture
for any parameter.
> 1. The ability to map a model name or mosfet model-level-numer into such
> a subcircuit. I think this could be mostly an internal syntactic
> transformation. It would let you continue to use for
> example "m" mosfet elements while implementing the model as a
> subcircuit.
It is easy to modify the inpdomod.c and inptypelook to add this feature.
Paolo
Partial thread listing: