Commit Graph

9474 Commits

Author SHA1 Message Date
Brian Taylor 843fbde6e9 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. 2023-10-14 16:01:39 -07:00
Brian Taylor 29e048df6f Add modifications note. 2023-10-13 19:23:38 -07:00
Brian Taylor 73010da4e9 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. 2023-10-13 18:15:38 -07:00
Brian Taylor fcb61e5c3e Add examples/xspice/d_process. 2023-10-11 15:03:57 -07:00
Brian Taylor dee0500140 Merge branch 'pre-master-42' into bt_dev 2023-10-11 14:42:29 -07:00
Holger Vogt 4b226bf11c add output for all noise sources 2023-10-11 09:52:44 +02:00
Holger Vogt 77c4cb5452 new bipolar noise example 2023-10-11 09:52:10 +02:00
Brian Taylor 074355f830 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-10 15:41:06 -07:00
Holger Vogt eb36084700 re-formatting (indentation, tabs removed) 2023-10-11 00:08:55 +02:00
Brian Taylor d114715d99 Remove unused reset_state param; do not allow null in and out, so there is at least 1 input and 1 output. 2023-10-09 21:52:32 -07:00
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.
2023-10-09 23:19:30 +02:00
Brian Taylor 4e4c871863 Remove the unused reset_delay param. 2023-10-08 20:22:00 -07:00
Brian Taylor 35ba73e27b Add array bounds check, fix typos. 2023-10-08 14:57:43 -07:00
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.
2023-10-07 17:13:55 +02:00
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
2023-10-07 17:10:31 +02:00
Holger Vogt 9944a4869f typo 2023-10-07 13:36:56 +02:00
Brian Taylor 26bba7a1bc Fix VisualC and Mingw compiler warnings. 2023-10-06 14:58:53 -07:00
Brian Taylor 0d7ca7f669 Add callback to free process memory. 2023-10-05 15:13:26 -07:00
Brian Taylor a720193335 Merge branch 'pre-master-42' into bt_dev 2023-10-05 10:22:13 -07:00
h_vogt 7ab929e945 klu and osdi are becoming standard now. 2023-10-05 00:26:02 +02:00
Holger Vogt 53315ed764 Prevent crash when no input file given. 2023-10-05 00:19:51 +02:00
Brian Taylor eea7514b07 Add MODIFICATIONS note, cleanup white space. 2023-10-04 14:46:42 -07:00
Holger Vogt 4f79105b06 Add comment 2023-10-02 10:07:52 +02:00
Holger Vogt 233f9daba4 Remove unused instance parameter ic (initial condition of controlling source). 2023-10-01 10:51:31 +02:00
Brian Taylor b96da3f58c Merge branch 'pre-master-42' into bt_dev 2023-09-30 09:10:20 -07:00
Brian Taylor cf593816dc Add __MINGW64__ defines for builds on mingw with msys. 2023-09-29 18:14:11 -07:00
Holger Vogt b1f367bc07 Remove adms
Add KLU and OSDI
2023-09-30 00:48:29 +02:00
Brian Taylor ff13f58b1b 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. 2023-09-28 16:31:02 -07:00
Brian Taylor 14316d7518 Merge branch 'pre-master-42' into bt_dev 2023-09-28 11:25:18 -07:00
Holger Vogt 28b495318d Update to command 'wrnodev':
Prevent crash if tran is not (yet) run.
Open output file only when data are available.
Enhanced comment and warning message.
2023-09-28 10:05:31 +02:00
Holger Vogt e449c894ce Prepend title line by '*' if printed by 'listing r'.
This allows skipping all pre-processing.
2023-09-27 15:51:16 +02:00
Holger Vogt 76f837b0b7 skip all pre-processing for expanded input files created by 'listing r' 2023-09-27 15:49:37 +02:00
Giles Atkinson a5704c8453 Fix a "make check" failure, by restoring the dollar-1 test to its
state before a70e708 as that change is no longer needed after 2790fd6.
2023-09-25 20:20:06 +02:00
Giles Atkinson 2790fd68bb Make the special "noglob" variable work. To preserve previous behaviour
change the default value from true to undefined (meaning false).
Also fix a misleading comment in glob.c.
2023-09-25 10:54:13 +02:00
Giles Atkinson a70e708114 Make special interpreter variable "noglob" behave as documented:
globbing is off by default.  An incompatible change, but previous
behaviour can be restored by "unset noglob" in .spiceinit.
2023-09-23 17:03:34 +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
Giles Atkinson 588116af48 Fix a bug in the "help" command. Some commands have no action function,
so the function pointer should not be used to detect the end of the table.
Use the command name instead.
2023-09-23 17:03:19 +02:00
Giles Atkinson 423f9a9db2 Fix a build bug for XSPICE: files generated for code models are
not removed when doing 'make clean' from release/src/xspice or above.
2023-09-23 17:03:09 +02:00
Holger Vogt 930bd12dc2 Enable degug mode in shared ngspice with KLU 2023-09-23 16:51:28 +02:00
Holger Vogt f3eb46e76d Fix bug in fprintf 2023-09-23 16:45:35 +02:00
Holger Vogt b034332e84 Improve warning message during evaluating .probe 2023-09-19 14:57:22 +02:00
Giles Atkinson 62471ecede Fix two bugs in cmpp: an unmatched right bracket in cfunc.mod
causes an infinite parsing loop (mod_yacc.y) and XSPICE macros
are replaced in string literals (mod_lex.l).
2023-09-16 00:19:36 +02:00
Holger Vogt dbc5042263 Prevent a crash if port cntrl is set to NULL 2023-09-15 23:42:08 +02:00
Holger Vogt 01bdd44ef9 Modify the previous commit a616a0abe:
no spaces in the first column
2023-09-15 23:41:12 +02:00
Brian Taylor 9646e86884 Merge branch 'pre-master-42' into bt_dev 2023-09-15 10:34:57 -07:00
Vogt a616a0abe3 Add variable wr_onspace to allow printing the vetor name with
one space delimiter
2023-09-14 15:22:14 +02:00
Holger Vogt daa58f4125 Fix previous commit [acb7f2]
Allow frequency 0 Hz (make check will do agian).
2023-09-11 22:48:50 +02:00
Brian Taylor f1ecb41be5 Merge branch 'pre-master-42' into bt_dev 2023-09-11 13:26:45 -07:00
Holger Vogt acb7f2cd97 Make .ac error messages more verbose, prevent some crash,
enable default values.
2023-09-11 17:42:38 +02:00
dwarning 4368790c5d remove compiler warning wrt. prototypes 2023-09-11 14:50:27 +02:00