Re: [ng-spice-devel] Re: [ng-spice] [ng-spice-devel] a bit more


To ng-spice-devel@ieee.ing.uniroma1.it
From Paolo Nenzi <pnenzi@ieee.ing.uniroma1.it>
Date Sun, 6 Feb 2000 09:48:14 +0100 (CET)
Delivered-To mailing list ng-spice-devel@ieee.ing.uniroma1.it
In-Reply-To <Pine.GHP.4.10.10002052242350.3771-100000@rukbat.cs.unc.edu >
Mailing-List contact ng-spice-devel-help@ieee.ing.uniroma1.it; run by ezmlm
Reply-To ng-spice-devel@ieee.ing.uniroma1.it



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: