Giles Atkinson
f6f7319792
Add null-pointer checks to some code that crashed when trying
to .print results from a non-existent analysis. Also remove the
troublesome .plot and .print lines from two examples.
2 years ago
Giles Atkinson
4228ba6e8a
Ignore end-of-line comments in quoted strings.
2 years ago
Holger Vogt
0a087809d6
If both node names are the same, just print them once in the error message.
2 years ago
Brian Taylor
0555c5d9c7
Make previous KLU support check more transparent.
2 years ago
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).
2 years ago
dwarning
35d338f256
partly revert commit 423f9a9db - don't remove xspice/icm .c files
2 years ago
Holger Vogt
d27b888f13
Noise simulation is buggy when using the KLU solver. Thus for now it is disabled.
Use 'option sparse' instead.
2 years ago
dwarning
4e1452cdb7
rm compiler warnings
2 years ago
dwarning
42f882e4e4
add osdinoise.c
2 years ago
dwarning
e67a6a1297
add osdinoise
2 years ago
Pascal Kuthe
5223f4b27d
fix(hicuml2): ensure flicker noise power is always stored in state vec
2 years ago
Pascal Kuthe
c21f87051a
always compute osdi noise powers
ngspice will reuse operating points for noise analysis so we can not trust
the mode flags
2 years ago
Pascal Kuthe
826cddb483
add examples for OSDI noise
2 years ago
Pascal Kuthe
f66e0bf2ac
implement osdi noise support
2 years ago
Brian Taylor
04c68d5f30
Cleanup child processes on Windows VisualC and Mingw. On Linux those processes quit when ngspice quits.
2 years ago
Brian Taylor
864ef7925c
Add notes on the structure and organization of an external d_process program.
2 years ago
Brian Taylor
4219efb5d5
Make it explicit that null output ports are not allowed. The output port vector bounds are always >= 1.
2 years ago
Brian Taylor
5c6b9f03b5
Fix the zero count.
2 years ago
Brian Taylor
1f5f7ae439
Update d_process examples.
2 years ago
Brian Taylor
c83d11c9c0
Call cm_cexit() to prevent the simulator running when d_process initialization errors occur.
2 years ago
Holger Vogt
21761207bc
Change license to 3-clause BSD (see
https://sourceforge.net/p/ngspice/ngspice/merge-requests/6/?limit=25#fd4f/73e6 )
2 years ago
Brian Taylor
09f070f582
Error handling improvements in cfunc.mod. Ensure that d_process.h wiil always respond to version and interface checks sent from sendheader. This is needed so that the pipe reads in sendheader do not cause Windows to hang when the interface version and in/out counts do not match. This hang was the cause of errors not being reported and the Windows gui hanging. Startup and header checks are now detected in cm_d_process, and the simulator will run but with runtime errors since a d_process model cannot be completely instantiated after initial errors. It would be good to find a means of gracefully halting the simulation run.
2 years ago
Brian Taylor
8c72a76844
Another attempt at clean up of error handling and reporting. It's OK on limux and cygwin, but Windows VisualC is being stubborn. I would prefer not to have to call exit(1) just for Windows, since then nothing is reported and the gui disappears in a puff of smoke. Even without the exit calls nothing gets reported with the Windows gui which will hang when there are errors detected by d_process.
2 years ago
Brian Taylor
4eae039779
Add modifications note.
2 years ago
Brian Taylor
4530cde8e2
Use Xspice cm_message_send to report errors rathen than printing to stderr and calling exit. When a d_process model has errors found in start(), sendheader(), and dprocess_exchangedata() these are reported, but if the model is run a SIGINT is raised. There must be a better way of stopping the simulator.
2 years ago
Brian Taylor
182764a894
Add examples/xspice/d_process.
2 years ago
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.
2 years ago
Brian Taylor
307ba1985b
Remove unused reset_state param; do not allow null in and out, so there is at least 1 input and 1 output.
2 years ago
Brian Taylor
7820940be3
Remove the unused reset_delay param.
2 years ago
Brian Taylor
e762047fc2
Add array bounds check, fix typos.
2 years ago
Brian Taylor
022a340ddb
Fix VisualC and Mingw compiler warnings.
3 years ago
Brian Taylor
cccb4a1559
Add callback to free process memory.
3 years ago
Brian Taylor
33780055ee
Add MODIFICATIONS note, cleanup white space.
3 years ago
Brian Taylor
5c4352d02f
Add __MINGW64__ defines for builds on mingw with msys.
3 years ago
Brian Taylor
3bb6e86015
Add Windows Visual Studio support for the Isotel d_process xspice digital model. The Isotel mixedsim-master/examples/embedded/motorforce C code needs to have minor changes for _MSC_VER defines, and are not included with this commit. The changes relate to using #pragma pack(push, 1)...#pragma pack(pop) around some structs, and setting stdin/stdout in binary mode. It is doubtful that the cfunc.mod will compile on mingw or cygwin since I don't know if they support pipe/fork/exec/spawn calls. The code builds and runs on Windows, Linux, and MacOS. In the future, Giles Atkinson is looking at allowing Xspice models to load shared libraries (.dll, .so) which will avoid creating and communicating with an external program.
3 years ago
Holger Vogt
046be0cdc8
Use the PSP103 model pspnqs103va (including nqs option)
as this is the standard in the IHP Open PDK.
2 years ago
Holger Vogt
efdf332061
Prevent a crash if hash model table was not generated,
e.g. due to missing valid models.
2 years ago
Holger Vogt
ce82c839e3
dependent project klu_complex added
2 years ago
Holger Vogt
10d7297798
Add cm_cecit(). If the input file could not be opened, stop ngspice.
2 years ago
Holger Vogt
19ebfb1887
Add a code model function cm_exit(const int exitcode).
This function calls controlled_exit(exitcode) to shut
down gracefully.
2 years ago
Holger Vogt
f26dda8616
Formatting
2 years ago
Holger Vogt
39443fafdd
Removing unused models takes much more time than keeping them
for large circuits.
Probably a hash table may help here (t.b.d.).
2 years ago
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.
2 years ago
Holger Vogt
9702557f81
Evaluate function gauss() in B sources. This is required when
in .model files the tokens 'temper' and gauss() coexist, because
then the B Source function parser is applied.
2 years ago
Holger Vogt
4b226bf11c
add output for all noise sources
2 years ago
Holger Vogt
77c4cb5452
new bipolar noise example
2 years ago
Holger Vogt
eb36084700
re-formatting (indentation, tabs removed)
2 years ago
Holger Vogt
9edf34495e
Don't say 'issue in line no. 0', as this 'info' does not tell
where the line with position 0 really is in the input deck.
2 years ago
Holger Vogt
7c3cb8169c
This is a re-write of the PWM generator.
It is modelled according to the new d_OSC by Giles Atkinson.
Here frequency is fixed and duty cycle is controlled by an
analog input.
2 years ago
Holger Vogt
ecb416b800
This patch fixes a bug when shared library uses XSPICE:
Don't subtract delta twice, when breakpoint is active
and step is rejected.
https://sourceforge.net/p/ngspice/patches/106/
Thanks to Vyacheslav Shevchuk
2 years ago