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
Francesco Lannutti
534394c0bb
First attempt of KLU support for XSPICE
2023-08-16 11:14:16 +02:00
Francesco Lannutti
a5885f0e95
Compacted the flag for KLU matrix being Real or Complex to one single bit
2023-08-16 11:14:15 +02:00
Francesco Lannutti
463e2db25a
Fixed Sensibility Analysis for KLU - First Trial
2023-08-16 11:14:13 +02:00
Francesco Lannutti
e77879ae50
Implement klu_z_print()
2023-08-16 11:14:13 +02:00
Francesco Lannutti
0afda7f89c
Implement spMatrix_CSC_dump()
2023-08-16 11:14:13 +02:00
Francesco Lannutti
4d37c32a14
Implemented spDeterminant_KLU
2023-08-16 11:14:12 +02:00
Francesco Lannutti
4489f2b0b2
klu_extract_Udiag, Fixed the PZ Analysis for KLU - Added a missing KLU node in VSRC which exists only in case of PZ Analysis - Other fixes
2023-08-16 11:14:12 +02:00
Francesco Lannutti
f25b22e56a
Fixed a bug in SMPpreOrder and let KLU digest an empty matrix
2023-08-16 11:14:12 +02:00
Francesco Lannutti
ce18d6846f
KLU Integration from scratch #4 , changed files
2023-08-16 11:14:10 +02:00
Francesco Lannutti
cf5991ae81
KLU Integration from scratch #1 , new files
2023-08-16 11:14:10 +02:00
Francesco Lannutti
60b4c3cda7
move include files to src/include/ngspice/
2023-08-16 11:14:10 +02:00
holger
57c880b6a3
Prepare ngspice-41
2023-08-13 14:03:34 +02:00
Holger Vogt
d4c54123d4
Revert "Add code in ivars.c to look for a SPICE_ROOT environment variable"
...
This reverts commit 6b0ab44f1e .
2023-08-06 16:27:33 +02:00
Giles Atkinson
6b0ab44f1e
Add code in ivars.c to look for a SPICE_ROOT environment variable
...
that gives the location of the ngspice installation. That allows
binaries to be installed in a different directory to the one
compiled in. The spinit startup file is made location-independent
by passing a variable giving the location of loadable modules,
so this fixes Bug #615 -
"spinit contains arch dependent paths, but is installed as noarch DATA".
2023-07-31 14:29:23 +02:00
Holger Vogt
18911b06b6
re-enable rcheck debug output with WINGUI
2023-07-31 14:27:35 +02:00
Holger Vogt
fe3222a118
Add an option nginfo to enable a status report during simulation
...
(currently available only with MS Windows GUI version).
2023-07-31 14:26:40 +02:00
Giles Atkinson
5114d6c2f4
Add an option to the iplot command: -d sets the number of simulation
...
steps before the window is shown. The value can be chosen to
limit rapid resizing when starting and that is used in the PLL examples.
2023-07-15 11:29:32 +02:00