Holger Vogt
d2cc17b45d
Add function ngSpice_Reset(void) to completely reset shared ngspice,
...
so that it may be restartet again by ngSpice_Init
2024-07-16 16:21:36 +02:00
Holger Vogt
942b4f62b4
43+ developing towards ngspice-44
2024-07-14 12:58:45 +02:00
Holger Vogt
33939d3f50
Prepare ngspice-43
2024-06-22 17:06:45 +02:00
Holger Vogt
344beaad24
Add ft_spiniterror, to be set during spinit processing,as
...
ft_stricterror will be set only later, when .spiceinit is
executed.
2024-06-22 14:21:01 +02:00
Holger Vogt
36bc67ecbb
Save the wordlist sourceinfo to the current circuit.
...
Remove sourceinfo only upon 'quit'.
2024-05-14 16:30:59 +02:00
Holger Vogt
fc7ba6ee8f
Add a fcn wl_delete to free the wordlist, but not its wl_word contents.
2024-05-14 16:30:49 +02:00
Holger Vogt
97d9f38421
Add (enhanced) patch by Giles Atkinson
...
Add controlled_exit() to errors when parsing functions.
Add verbose error messages, including line number and
name of the source file.
.lib file handlinmg with its recursive structure probably needs
testing and improvements.
More error messages may need this update.
2024-05-14 16:30:36 +02:00
Holger Vogt
e151b691fb
Add an additional funtion parameter 'filename' to fcn inp_readall
...
to transfer not only the folder, but also the file name of the
current input
2024-05-14 16:28:40 +02:00
Holger Vogt
da3d51ce9a
Add 'linesource', to contain the path/file of the origin of the line.
2024-05-14 16:28:17 +02:00
Holger Vogt
4ed1ebf874
avoid crash when compiled with lto
2024-05-01 10:32:43 +02:00
Giles Atkinson
7dd2db904c
Change CMPP-related struct Mif_Parse_Value to a union
...
as C99 allows initialisation of any member. Also correct a comment
in miftypes.h.
2024-05-01 10:30:48 +02:00
Giles Atkinson
0152ea92db
Support use of vector defaults for XSPICE vector parameters.
...
This answers Feature Request 60 - "Array as default value for parameter".
2024-05-01 10:30:40 +02:00
Brian Taylor
d002ba353b
Fix scan_gates to consider correctly gates with an inverted output. Refactor the checks in infix_to_postfix for invalid postfix expressions.
2024-05-01 10:29:35 +02:00
Brian Taylor
0ec0c92eae
Go back to before previous merge.
2024-05-01 10:29:21 +02:00
Brian Taylor
57048228e9
Add variable ps_scan_gates_optimize (default 1). If < 1, then turn off the optimizations in scan_gates.
2024-05-01 10:28:53 +02:00
Holger Vogt
8f2f0088f2
Add a new exported function ngSpice_nospinit() to set
...
variable no_spinit.
2024-05-01 10:28:09 +02:00
Holger Vogt
ee39b2600b
Add a evaluation function which truly removes also the
...
scale factor from the token when gobble=0 before
moving on.
2024-03-29 17:16:41 +01:00
Brian Taylor
a70297e87a
Several PSPICE 9.1 evaluation digital libraries contain timing .model statements at the global level for subckts with U* instances that reference those models. By specifying "set ps_global_tmodels=1" in .spiceinit an extra pass inside u_instances() will collect those global timing models for use in subckts. Report errors detected when ngspice parses a LOGICEXP but has not added support for operator precendence. Include a hint of how to fix those errors by inserting parentheses. This error only occurs in 10 of 585 cases in the libraries. Note that inpcompat.c has been saved as a unix filetype.
2024-01-17 14:15:07 +01:00
Holger Vogt
a4ae81ec06
We are developing towards ngspice-43
2024-01-06 23:14:26 +01:00
Holger Vogt
f8e77d08d0
More headers distributed
2023-12-27 17:12:15 +01:00
Holger Vogt
a08f1046e4
Add KLU headers to enable their distribution
2023-12-27 16:18:36 +01:00
Holger Vogt
4671b588b6
Update comment
2023-12-22 17:14:43 +01:00
Holger Vogt
9a50f8b749
typo
2023-12-12 17:24:23 +01:00
Holger Vogt
ce8f6c5017
prepare ngspice-42
2023-12-12 17:08:58 +01:00
Holger Vogt
2e56f3a063
Add short description of the new interface functions
...
ngSpice_LockRealloc(void) ad ngSpice_UnlockRealloc(void)
2023-12-12 17:02:19 +01:00
Giles Atkinson
566e2938f4
Add XSPICE code model d_cosim, a generic adaptor for digital cosimulation.
2023-11-27 14:50:21 +00:00
Giles Atkinson
12fe7b90c4
Add new code model function cm_irreversible(). This may only be
...
called from an XSPICE code model's INIT call and has three effects:
the instance is treated as "hybrid" even when it does not use both
port types; its position in the hybrids array is adusted; and it
is explicitly notifed when called just befoore the end of an
analog time-step.
2023-11-26 18:30:53 +00:00
Giles Atkinson
34e6c4abea
Convert XSPICE's hybrid_index array to instance pointers.
...
That simplifies code and will be needed for irreversible code model support.
2023-11-26 18:29:23 +00:00
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.
2023-11-23 18:29:48 +01:00
Holger Vogt
b62bb20e6f
Increase the allowable node name length from 24 to 256.
...
Enable safe copying, no user induced buffer overflow.
2023-11-18 10:55:19 +01:00
Holger Vogt
2a005292db
Sparse 1.3 is the matrix solver if no option (sparse or klu) is given.
...
KLU is selected by 'option klu'
If both 'option klu' and 'option sparse' are given,
the last one executed determines the solver.
'option sparse=0' de-selects spares, i.e. selects klu.
'option klu=0' de-selects klu, selects sparse.
'option klu=1' has the same meaning as 'option klu'.
'option sparse=1' has the same meaning as 'option sparse'.
2023-11-12 16:32:40 +01:00
Holger Vogt
c87df54f24
Remove unused global variable cp_dol.
...
This also prevents a gcc 13 bug, as cp_dol has been set to '\0'
by -O2 optimization (see
https://stackoverflow.com/questions/77407156/s-0-being-optimized-out-possible-gcc-13-bug-or-some-undefined-behaviour )
2023-11-11 10:39:51 +01:00
Brian Taylor
0555c5d9c7
Make previous KLU support check more transparent.
2023-11-08 11:49:28 +01:00
Brian Taylor
295f212de8
When CIDER is detected, until KLU works with CIDER, print Error: CIDER simulation is not (yet) supported with 'option klu'. Use 'option sparse' instead. and then call controlled exit(1).
2023-11-08 11:49:22 +01:00
Pascal Kuthe
f66e0bf2ac
implement osdi noise support
2023-11-04 19:36:30 +01:00
Brian Taylor
df28fabc42
Restore the deleted unused params to be backword compatible. Handle the case where the d_process instance has a null in vector, so that N_din is zero. This allows the model to be just a pattern generator. Add include to cmproto.h to avoid a forward ref. to an enum type.
2023-10-28 11:00:03 +02:00
Holger Vogt
19ebfb1887
Add a code model function cm_exit(const int exitcode).
...
This function calls controlled_exit(exitcode) to shut
down gracefully.
2023-10-18 22:46:27 +02:00
Holger Vogt
8ef0aece58
During setup of the models thre have been search scans in the
...
linked model list modtab. The time used here grows approx.
quadratically with the number of models. If the numbers get large,
e.g. with the IHP Open PDK, setup time make simulation impractical.
Therefore the linked list modtab has been enhanced by a hash table
modtabhash, which allows linear search time and makes simulation
of a 200k transistor circuit with IHP PDK possible. Already
the setup time for 15k transistor circuits has been reduced.
2023-10-18 14:34:16 +02:00
Giles Atkinson
41c61604c5
Handle SIGTTIN and SIGTTOU on Unix-like OSs with X11 graphics.
...
That makes it possible to push ngspice into the background while
plot windows are open: the windows remain responsive.
Discussion on ngspice-users, starting 2023-09-01,
title: "`quit` in Interactive Mode."
Also restore terminal state when forcing exit with SIGINT (control-C).
2023-09-23 17:03:24 +02:00
Brian Taylor
492bb64d92
By default, use the shortest typical delay estimate. This makes the digi_74LS90_74LS42.cir testcase for bug641 behave almost the same as MicroCap 12. In ngspice and MicroCap, the only signal with a glitch is not_y8. The other not_* signals look the same. Setting ps_use_mntymx in .spiceinit will change the delay estimates. See the function set_u_devices_info in src/frontend/udevices.c for the various settings of ps_use_mntymx.
2023-09-09 23:22:06 +02:00
Holger Vogt
d5ceced24d
We are developing towards ngspice-42
2023-08-19 23:54:36 +02:00
Pascal Kuthe
499634df47
integrate OSDI with KLU
2023-08-16 11:14:25 +02:00
Francesco Lannutti
13e74751cc
Fixed a MLK for XSPICE and commented out an unused array
2023-08-16 11:14:24 +02:00
Francesco Lannutti
b08eb2266a
Added initial KLU support for node collapsing
2023-08-16 11:14:24 +02:00
Francesco Lannutti
3c15993fe5
Fixed the case when DiagGmin has to not be loaded again and the case when refactoring returns 1
2023-08-16 11:14:21 +02:00
Francesco Lannutti
fe89da2b2c
Getting rid of SPARSE for Initial Circuit Matrix creation. Now KLU is totally independent from SPARSE. This opens up the interface for other solvers as well
...
SPARSE can still used through '.options sparse', but it isn't possible to switch from KLU to SPARSE and viceversa at run-time
2023-08-16 11:14:18 +02:00
Francesco Lannutti
49f6444957
Added "klu_memgrow_factor" option to control the KLU memory grow factor
2023-08-16 11:14:18 +02:00
Francesco Lannutti
8a8adfe451
First KLU support of CIDER TWOD simulations
2023-08-16 11:14:17 +02:00
Francesco Lannutti
11fb209ee6
First KLU support of CIDER ONED simulations
2023-08-16 11:14:16 +02:00
Francesco Lannutti
4c351f51bd
Moved the KLU binding structures to be property of the XSPICE connections, instead of XSPICE instances
2023-08-16 11:14:16 +02:00