Commit Graph

756 Commits

Author SHA1 Message Date
holger 72d3f12ab5 add new header spardefs.h to noinst_HEADERS 2022-05-16 16:30:26 +02:00
Holger Vogt 1140af3e8b Prepare ngspice-37 2022-05-16 16:30:09 +02:00
Holger Vogt cf62c69aef remove numerous unsigned int vs. int warnings
by setting all variables to type int.
Remove redundant function declarations by remmoving some includes
in span.c and vsrcdefs.h
In tmalloc convert int to size_t
2022-04-29 23:22:05 +02:00
Holger Vogt 7703c2d370 Add a function itoa10 and use it
instead of non-standard itoa.
2022-04-25 13:35:23 +02:00
Holger Vogt ae221a70c2 Remove a typo: runable --> runnable 2022-04-15 10:52:56 +02:00
Alessio Cacciatori abd5b5ea04 S-parameters in ngspice
With this commit the patch provided by Alessio Cacchiatori the S-parameter is completed:
Noise simulation added with C matrix output
Y and Z matrix output enabled

To allow compiling with gcc, the dense.h inline functions have been put into denseinlines.h
2022-03-29 09:06:10 +02:00
Alessio Cacciatori 2c10c4aebd S parameter simulation
Command '.sp'
arbitrary number of ports
ports made with modified VSRC

Patch provided by Alessio Cacciatori
https://sourceforge.net/p/ngspice/discussion/127605/thread/7a2655c86f/
2022-02-17 15:48:00 +01:00
Holger Vogt 0eb272243f Enable RKM notation also for inductors (e.g. 1u2 for 1.2u) 2022-02-07 16:00:29 +01:00
Holger Vogt 4f82a24df2 Add parameter 'isgrid' to plotting of arcs.
Smithgrid and polar plots could not discern between xgridwidth and
xbrushwidth. This is now available, similar to straight line plotting.
Tested also for PS and SVG.
2022-02-01 12:23:29 +01:00
Holger Vogt 64dba93b93 We are now developing ngspice-36+ 2022-01-09 11:57:05 +01:00
Holger Vogt f0e9a35eb6 Add 'esave' command to save only specific event nodes.
Add a prompt for esave/eprint/eprvcd.
2022-01-09 10:58:38 +01:00
Holger Vogt cb0d8f18dc Prepare for ngspice-36 2021-12-18 13:47:43 +01:00
Holger Vogt 1605d293d0 Add function integ to control language
Trapezoidal rule for integrating a vector.
2021-12-13 21:49:45 +01:00
Holger Vogt e93a19e3e8 Allow math characters in node names
Add a function ft_getpnames_quotes()
It puts quotes " around tokens xxx, when these are enclosed as
V(xxx) and contain arithmetic characters. V(R*C) becomes
V("R*C"). After settig up the parse tree, the quotes are removed again.
Thus these math character remain part of the node name and are not
parsed as parts of an equation.
2021-12-13 21:41:16 +01:00
Holger Vogt 90377dcff9 struct TSKtask: group all single bit fields together 2021-12-13 21:40:38 +01:00
Brian Taylor 38848259e4 With the ngspice gnuplot command, enable x/y contour plots for 2d Cider save file data. Usage: gnuplot <file> xycontour <expr>. xycontour is a new flag which is ignored if the plot data is not from 2d Cider. For contours, only a single plotarg <expr> is allowed. With <expr1> vs <expr2>, only <expr1> is plotted and <expr2> is ignored. 2021-10-30 13:21:32 +02:00
Holger Vogt 7c38699cd7 Add missing function nghash_delete_special(),
developed for branch gc-local
2021-10-30 10:39:19 +02:00
Holger Vogt daa3609e58 Enable RKM notation for R and C, when ngbehavior LT is selected.
Add 2 evaluation functions specific for R and C respectively.
R has code letters L, R, K, M, G, T enabled. M here is Meg!
C has code letters p, n, u or µ, m, F. F here is unity, femto is
not available, m is still milli!
Two examples files show all cases.
2021-09-29 20:31:14 +02:00
Holger Vogt 5d116d1fb9 command listing: add option r (runable)
listing r > $inputdir/mycirc_runable.cir
will save the expanded netlist without line numbers,
ready to be sourced again and run in ngspice.
2021-09-29 20:29:26 +02:00
Holger Vogt 493cf73f7f optran is only selected when the 'optran' command has been processed.
If not, the call to the OPtran() function returns the previous
'converged' value.
2021-09-29 20:12:52 +02:00
Holger Vogt df0792818f Transient op calculation added to the standard operating point code.
When standard iteration, gmin stepping and source stepping fail,
try a transient simulation (like tran with uic option) to
determine the op. Implemented for AC and Tran simulation.
2021-09-29 20:00:29 +02:00
Holger Vogt 9a2d968577 When transferring boolean data over the ABI, keep them as boolean types, not integer
Replace the type of all boolean variables around the ABI by NG_BOOL.
NG_BOOL is typedefed to _Bool, when compiling shared ngspice. When
sharedspice.h is use externally NG_BOOL is typdefed to bool
2021-08-03 15:57:58 +02:00
Holger Vogt 4feb43e067 Prepare ngspice-35 2021-07-22 20:38:08 +02:00
Holger Vogt 8eeb924460 CIDER: Enable printing either binary or ascii data output to file.
Patch provided by Brian Taylor, see
(https://sourceforge.net/p/ngspice/mailman/message/37309841/)
2021-07-05 14:31:21 +02:00
Holger Vogt 03517ae86c Define the function DevFinalize as used in the previous commit. 2021-07-05 14:22:55 +02:00
Holger Vogt a6079781ea Fix previous commit, enable name upgrade for Linux and other non-Win OSs 2021-07-05 14:22:10 +02:00
Holger Vogt 1266225cdb For C and R device enable value tokens like 4k7 or 1u2
in addition to 4.7k and 1.2u.

Valid for
R1 1 0 47k
C2 3 6 1u2
only. Does not interfere with other value tokens in params etc.
2021-07-05 14:17:31 +02:00
Holger Vogt f8357dad88 Prepare Cshunt: add a cpacitor to each voltage node
Function inppas4() will add the extra caps, to be done.
2021-07-02 11:52:15 +02:00
Holger Vogt 4bee26b8b9 Remove unused prototype 2021-07-02 11:45:11 +02:00
Holger Vogt 7064df7f3b Define a preprocessor flag HAS_NG_BOOL 2021-05-05 21:59:25 +02:00
Holger Vogt f6ba097b9c Replace BOOL by NG_BOOL
Avoid clashes in environments where BOOL my be used differently.
NG_BOOL is typedefed to int, as ngspice uses int for boolean variables.
2021-05-05 10:52:13 +02:00
Holger Vogt ded0f79c01 Avoid type 'bool', as ist is a built-in type in C++, not
equaling  'int' which ngspice is using.

Change bool to BOOL and ad a
typedef int BOOL;
2021-03-28 18:20:47 +02:00
Holger Vogt 5abd8057e6 remove deprecated storage class 2021-03-28 13:30:39 +02:00
Holger Vogt f61ea3aa96 if 'set nounits' is given, plotting of the units is suppressed
(they may be added manually to the y and x labels for SI conformity).
2021-03-14 15:32:49 +01:00
Holger Vogt 462534a0fb Rename the ngspice version information offered in sharedspice.h 2021-02-21 16:47:44 +01:00
Holger Vogt 99a7bfd8fe Move version info from sharedspice.c to sharedspice.h 2021-02-21 16:47:19 +01:00
Holger Vogt 0ae9aeec41 remove config.h from dist and install 2021-02-21 16:47:02 +01:00
Holger Vogt 5747982ae8 Re-enable devices like E2 1 0 (2,3) 1
Add a new function nexttok_noparens(const char *s) which
skips tokens. Characters , ( and ) are treated like spaces.
2021-01-28 17:06:02 +01:00
Holger Vogt ffef8e1d16 Remeove "redefinition" warning 2021-01-26 18:18:59 +01:00
Holger Vogt 06eddf1adc We need config.h.in, when compiling with ./configure,
that is without resorting to autoconf, automake etc.
So partially undo the previous commit.
2021-01-24 12:55:51 +01:00
Holger Vogt c14680c951 Do not distribute config.h.in 2021-01-24 11:29:48 +01:00
Holger Vogt ebff1fe79f makefile.am for cppduals 2021-01-23 12:54:23 +01:00
Holger Vogt 7dc6c47df5 config.h should not be distributed or installed
somewhere, because it is generated locally during
the build process.
2021-01-23 12:45:12 +01:00
Holger Vogt a5eac333bb Revert "When installing ngspice, do not install the headers"
This reverts commit 5a0d213fec.
2021-01-22 16:05:14 +01:00
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.
2021-01-20 16:44:57 +01:00
Holger Vogt 94eac89749 Remove 'comment out any unused models' for now, it
has been working, but led to spurious error messages.
Has to be checked more thoroughly.

Add a ngbehaviour setting 'mc', needed for running
'make check'. It will unset all other compatibility modes
and suppress the note on compatibility settings which
led to a 'make check' failure just due to its printout.
2021-01-02 19:12:26 +01:00
Holger Vogt 1234c3bdf8 Update to the compatibility mode:
Rename new_compat_mode() to set_compat_mode().
Add fcn print_compat_mode() to print out
the selected compatibility mode.
2021-01-02 19:11:44 +01:00
Holger Vogt 3c354092ff Line endings from \r\n to \n 2021-01-02 19:06:58 +01:00
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.
2020-12-22 17:56:18 +01:00
Holger Vogt 12ee985a68 Restrict #pragma warning to Visual Studio only. 2020-12-22 17:56:18 +01:00