Holger Vogt
2ac12df93b
while copying a deck, copy the new infos
2 years ago
Holger Vogt
603c730260
If TRACE is defined, print out everything without comment lines,
to improve readability.
Redo printing of global nodes when TRACE is defined.
2 years ago
Holger Vogt
65a91648ef
temporary printout of deck
2 years ago
Holger Vogt
3d1cbf93ee
Add a predifined variable 'skywaterpdk' to speed up circuit
loading and parsing.
If set, it removes quoting tokens for params. This requires
that Skywater PDK does adequately stick to the ngspice syntax
to put params in between braces. As far as tests go, it does.
It also set the number of nodes for MSO devices to 4, so no lengthy
search is required.
2 years ago
Holger Vogt
e57979d15d
Plug two memory leaks introduced by
2bbadc608 ("Use a hash table glonodes to prevent
double or multiple entries in global node table
global_nodes", 2023-11-17)
2 years ago
Holger Vogt
81bb886c71
Replace array global_nodes by hash table glonodes:
Save each global node only once
Search for global nodes hash table (much faster than scanning the list repeatedly).
Remove limit for amount of global nodes.
2 years ago
Holger Vogt
2bbadc6085
Use a hash table glonodes to prevent double or multiple entries
in global node table global_nodes
2 years ago
dwarning
924dc10368
get the right place for variable declaration
3 years ago
dwarning
a4f6a777c0
few cleanings to prevent compiler warnings
3 years ago
R. Timothy Edwards
c12296182c
The code in src/frontend/subckt.c has a fixed-size structure called table at the top with a size set to N_GLOBAL_NODES = 1005. If the number of items passed in formal and actual exceeds 1005, then ngspice exits immediately with an error.
This patch lets table be reallocated on the fly as needed to accommodate the number of subcircuit arguments, instead of being a fixed value.
3 years ago
Holger Vogt
50173ac617
Enable potential calls to tprint() for debugging
3 years ago
Holger Vogt
199b9deee6
For OSDI n devices: Enable model translation,
if model has been inside subcircuit.
3 years ago
Pascal Kuthe
79b2d2d520
removed unneded changes
3 years ago
Holger Vogt
8f0eab90ee
Replace 'a' by 'n' for OSDI device
3 years ago
Holger Vogt
a95b114768
Revert previous commit: now treat a devices like ordinary devices.
3 years ago
Holger Vogt
638ddbc91f
Add case 'a' to fcn translate.
This is a hack, to be removed/altered when switching to
reference designator N instead of A.
3 years ago
Holger Vogt
bde0639bc4
save within subcircuit
enable V(a,b) as v(a) v(b)
5 years ago
Holger Vogt
e90b3e711b
F.-request 85: save currents in subcircuits
Separate handling .ic/.nodeset and .save .
Add i(Vxx) to address translation.
Vxx#branch is not supported.
5 years ago
Holger Vogt
bd0113ea9a
Feature request 85: Enable .save within subcircuits
inp.c: Add .save to wl_first only after subcircuit expansion
subckt.c: treat .save like .ic
5 years ago
dwarning
4ca4b43801
simplify while loop for subckt diode and bjt models
5 years ago
dwarning
b1bf7ea0ad
Diode model with selfheating option
5 years ago
Holger Vogt
c9eeb0ceea
Modify get_number_terminals() and make it non-static.
Use modified function to replace fixed node number.
5 years ago
Holger Vogt
822a63974f
Unused binning models are removed.
Flag 'nf', when given on the x lines, is
recognized.
Tested with TSMC, Skywater, and X-Fab model
files.
5 years ago
Holger Vogt
014dfe1b7b
The old inp_deckcopy() is a safer way of copying, while retaining
the correct line numbers for parameter substitution.
5 years ago
Holger Vogt
b1d062668c
When there is no model found, and we have an m devices,
set the number of nodes to 4. This has to be fixed (find
a way to detect the number of nodes automatically).
5 years ago
Holger Vogt
5ee6a98e4b
Add a comment
5 years ago
Holger Vogt
8c253524af
With the new inp_deckcopy_ln treat the first line
in the deck equal to all other lines.
5 years ago
Holger Vogt
777cfcf477
Reduce the memory requirements if there is a PDK with
a lot of binning models.
This is a hack and needs testing!
inpcom.c: If an x line, add w and l to the netlist card,
if available.
subckt.c: select a suitable model bin, discard the rest
for each subcircuit, depending on w and l from above.
inpgmod.c: less restrictive equal for real numbers,
allow both min and max boundaries (problem of equating
real numbers), when the selected device has w or l on
the boundary between two model bins.
5 years ago
Holger Vogt
4bcacb310d
enable XSPICE %vnam in subcircuits.
The token following after %vnam has to be
tranlated as an instance during subcircuit expansion.
6 years ago
Holger Vogt
0490bc090b
Allow 3-terminal MOS devices (e.g. VDMOS),
prevent crash upon user error
6 years ago
Jim Monte
bfe660e57b
Formatting and added comments
6 years ago
Jim Monte
4bd4a6e9be
Fixed usage of new dstring functions. Also added const to some parameters that did not change.
6 years ago
dwarning
134e92b78f
vbic model implementation including self-heating effect
7 years ago
dwarning
96a5ea0353
Allow 3 terminal vdmos in subckt.
7 years ago
dwarning
ddd3a11bff
variables are assigned values twice successively
8 years ago
dwarning
a36366be1a
A call of the 'memset' function will lead to underflow of the buffer 'table'.
Table structure multiplied by N_GLOBAL_NODES will initialize the entire table with 0.
8 years ago
Holger Vogt
2dfdf984d6
re-number the lines during copying,
required by nupa_copy()
8 years ago
Holger Vogt
f9eb75f55d
skip comment lines
8 years ago
Holger Vogt
09c876550f
prevent string overflow by adding the string length
to the cp_getvar parameters. Used only with CP_STRING
8 years ago
Holger Vogt
a98d01e5f8
Use only internal memory functions, replace
free->tfree, malloc->tmalloc, realloc->trealloc
8 years ago
h_vogt
464f855d1d
subckt.c, introduce new function inp_deckcopy_oc()
copy a deck
without li_actual,
without comment lines
without .control section
10 years ago
h_vogt
3dd2115291
frontend/subckt.c, do not put model names into numparam hash table
nobody seems to make use of these entries.
see nupa_type which shrinks to four enum's
10 years ago
rlar
7b175dd1c4
numparam, drop unused `srcfile'
10 years ago
rlar
4f8bef997d
numparam, nupa_signal(), drop useless return value
10 years ago
rlar
2a149d7541
numparam, #3/4, nupa_scan(), use struct card * argument
9 years ago
rlar
77da3c6f26
numparam, #2/2, nupa_copy(), use struct card * argument
9 years ago
rlar
19dfaf03f3
numparam, #1/2, nupa_eval(), use struct card * argument
9 years ago
rlar
4ec2717079
struct card, #5/6, rewrite from type "card" to "struct card"
9 years ago
rlar
511cdd7188
struct card, #3/6, rename members from struct line to struct card
9 years ago
rlar
2142cfdcce
subckt.c, cleanup
9 years ago