rlar
80ef8b308d
inp2m.c, do not restrict binning to four nodes
...
until now, for unknown reasons,
the search for binned modelnames was restricted to
instances with less than five nodes.
2017-03-18 20:18:11 +01:00
rlar
50c0424225
inp2q.c, inp2m.c, plug a memory leak
2017-03-18 20:15:39 +01:00
Francesco Lannutti
43f24d6f22
rewrite cktsens.c in terms of the 'SMP' matrix interface
2017-03-17 18:22:36 +01:00
rlar
fb4f462388
SMPnewMatrix(), add 'size' to the function arguments
2017-03-17 18:12:48 +01:00
rlar
07d89b5fcd
devices/**, unify structure member variables, ptr -> Ptr
2017-03-17 17:42:58 +01:00
rlar
a6cb9d0d88
cplsetup.c, polish VECTOR_ALLOC and MATRIX_ALLOC
...
explicitly express the object type to be allocated
2017-03-17 17:37:24 +01:00
rlar
8c09761e6b
adms, polish autogen.sh and configure.ac
...
Allow to override the admsXml executable when invoking
autogen.sh and configure.ac
ADMSXML=/foo/bar/baz/admsXml ./autogen.sh --adms
ADMSXML=/foo/bar/baz/admsXml ./configure --enable-adms
alternatively (and more advertised)
./configure ADMSXML=/foo/bar/baz/admsXml --enable-adms
The generated Makefiles remember the given path.
A relative path doesn't make sense of course.
2017-03-12 19:34:37 +01:00
rlar
3ea412e7cd
bug fix for commit "inp2q.c, #17/23, rewrite, using a 'for' loop"
2017-03-12 17:57:27 +01:00
rlar
c3a92e2bb3
xspice, cleanup, move typedef over to the other ones
2017-03-12 12:18:09 +01:00
rlar
987952e57e
adms/admst/ngspiceMODULEsetup.c.xml, adms, implement DEVunsetup()
...
Which is needed to release the allocated circuit nodes in
the corresponding adms generated DEVsetup() routine.
This is required when invoking CKTsetup() more than once
without an intervening "reset".
2017-03-12 10:43:32 +01:00
rlar
6ccccbe7c4
adms/admst/ngspiceMODULE.c.xml, fix the port name table
...
which will be exported from the model code to "spice" via
struct IFdevice.terms
struct IFdevice.numNames
struct IFdevice.termNames
2017-03-12 10:41:52 +01:00
rlar
ba6955a1aa
inp2q.c, sanitise optional ports processing
...
Tie ports 4 and up to ground, iff not connected.
Actually, I think the model's DEVsetup routine should do this business,
we should pass -1 to denote the fact of being unconnected
2017-03-11 21:11:32 +01:00
rlar
3ce3424a9c
inp2q.c, #23/23, whitespace
2017-03-11 20:27:48 +01:00
rlar
9ad1a3033b
inp2q.c, #22/23, drop #ifdef, model_numnodes() does care about this
2017-03-11 20:27:48 +01:00
rlar
ac77e5b020
inp2q.c, #21/23, drop nname[] and model, use local 'token' instead
2017-03-11 20:27:47 +01:00
rlar
25fa9a4454
inp2q.c, #20/23, insist on a valid model, don't default to something
...
If a default model is needed, then create one explicitly:
q1 1 2 3 npndefault
.model npndefault npn()
Note:
This code was buggy anyway because the last token,
which turned out not to be a valid model name,
was silently swallowed.
Thus PARSECALL() didn't parse the whole thing.
2017-03-11 20:27:47 +01:00
rlar
b85a07c62c
inp2q.c, #19/23, rewrite, move code into the 'for' loop
2017-03-11 20:27:47 +01:00
rlar
b1ccdd2184
inp2q.c, #18/23, rewrite, combine two 'for' loop's
2017-03-11 20:27:47 +01:00
rlar
807115c145
inp2q.c, #17/23, rewrite, using a 'for' loop
2017-03-11 20:27:47 +01:00
rlar
03d3e2ea12
inp2q.c, #16/23, emit a message and give up, if we couldn't find the modelname token
...
Thats a functional change of ngspice.
So far we did cook up a "default" model when we didn't find a model token.
But this was buggy anyway, because in such cases we silently dropped
a token from beeing processed by PARSECALL()
Now, we emit a message, and skip this line alltogether.
2017-03-11 20:27:47 +01:00
rlar
83fb9353ef
inp2q.c, #15/23, rewrite, fall into an empty 'else' body when !ADMS
2017-03-11 20:27:47 +01:00
rlar
0bf0021a63
inp2q.c, #14/23, rewrite, assign model a bit later when recognised
2017-03-11 20:27:47 +01:00
rlar
ef37e92338
inp2q.c, #13/23, move code down
2017-03-11 20:27:47 +01:00
rlar
d2d9bffed0
inp2q.c, #12/23, move code down
...
Note; here i==4 and nodeflag still was 4
2017-03-11 20:27:46 +01:00
rlar
c8b1d18289
inp2q.c, #11/23, move code down
...
Note: here i==3 and nodeflag==4
2017-03-11 20:27:46 +01:00
rlar
c5ce68728f
inp2q.c, #10/23, use i to prepare for a loop
2017-03-11 20:27:46 +01:00
rlar
a21a2fd1b0
inp2q.c, #9/23, drop some TRACE code
2017-03-11 20:27:46 +01:00
rlar
16c00730e4
inp2q.c, #8/23, use a 'for' loop
...
Note: the range of nodeflag still is {4,5}
2017-03-11 20:27:46 +01:00
rlar
ffc943dfff
inp2q.c, #7/23, use an array
2017-03-11 20:27:46 +01:00
rlar
c82a9dd87e
inp2q.c, #6/23, transform boolean expression
...
Note: both values range over {4,5}
Thus, this is a functional invariant transformation
2017-03-11 20:27:46 +01:00
rlar
27d93293f9
inp2q.c, #5/23, rewrite using a new function model_numnodes()
2017-03-11 20:27:46 +01:00
rlar
b0fe181f12
inp2q.c, #4/23, transform boolean expression
2017-03-11 20:27:45 +01:00
rlar
042916ae88
inp2q.c, #3/23, renumber 'nodeflag'
...
range over {4,5} instead of {0,1}
2017-03-11 20:27:45 +01:00
rlar
9abcaa88ae
inp2q.c, #2/23, parenthesises and linewrap
2017-03-11 20:27:42 +01:00
rlar
c37ce079eb
inp2q.c, #1/23, rewrite, early 'exit' and 'return'
2017-03-11 19:58:58 +01:00
rlar
40ca7d6db3
inp2m.c, #9/9c, cleanup
2017-03-07 21:54:42 +01:00
rlar
eecd940af8
inp2m.c, #8/9c, drop valid_numnodes()
2017-03-07 21:54:33 +01:00
rlar
6edd684020
inp2m.c, #7/9c, rewrite valid_numnodes() using model_numnodes()
2017-03-07 21:54:23 +01:00
rlar
09fbc0ee97
inp2m.c, #6/9c, now fix model_numnodes()
...
to prevent instance struct storage beeing overwritten.
2017-03-07 21:54:13 +01:00
rlar
54f6bd8d56
inp2m.c, #5/9c, rewrite
2017-03-07 21:54:00 +01:00
rlar
01b75e08ab
inp2m.c, #4/9c, rewrite using model_numnodes()
2017-03-07 21:53:50 +01:00
rlar
396441e1ea
inp2m.c, #3/9c, abstraction, introduce model_numnodes()
...
Note:
This commit does not change behaviour in any way,
yet one can instantly see some sickness now.
Some of the models definitely do not have 7 nodes,
Actually we would like to fetch the number of terminals from
struct IFdevice, slot terms or slot numNames
But it turns out several models publish bogus values.
For example "B4SOI", which has 7 nodes, but claims to have 8
2017-03-07 21:53:37 +01:00
rlar
3bb68fbd7a
inp2m.c, #2/9c, rewrite using GENnode[]
2017-03-07 21:53:26 +01:00
rlar
81b5278674
inp2m.c, #1/9c, rename 'nodeflag'
2017-03-07 21:53:16 +01:00
rlar
c89e7c8818
inp2m.c, #15/15b, collapse remaining code into a for loop
2017-03-05 17:23:20 +01:00
rlar
85236c08e6
inp2m.c, #14/15b, cleanup, drop empty blocks
2017-03-05 17:23:12 +01:00
rlar
8fa3afa4ae
inp2m.c, #13/15b, rewrite, move common code to the end
2017-03-05 17:23:07 +01:00
rlar
3d6a2e2422
inp2m.c, #12/15b, unify, add code which won't be executed at all
...
actually, this most certainly unveils a bug in the original code,
lacking invocation of INPgetModBin() when optional extra nodes come
into play.
2017-03-05 17:23:03 +01:00
rlar
99136a16e7
inp2m.c, #11/15b, rewrite, use array expressions
2017-03-05 17:22:57 +01:00
rlar
7eb6006461
inp2m.c, #10/15b, use 'nodeflag' instead of literal values
2017-03-05 17:22:51 +01:00