Commit Graph

2161 Commits

Author SHA1 Message Date
Holger Vogt 0e46f6f8a1 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-05-01 10:29:08 +02:00
dwarning eaf67ac940 correct pnp type bipolar transistor current convention 2022-05-01 10:28:23 +02:00
Holger Vogt 3073d8c7d3 Fix a bug: remove excess ')' 2022-05-01 10:28:08 +02:00
Holger Vogt 8e80933cfa If XSPICE is not selected, still send CKTspDump(ckt, freq, spPlot),
but without ipc (spPlot instead of undefined acPlot)
2022-04-29 07:29:33 +02:00
Holger Vogt 2915f8e991 In case of resistor valuues r150 (r + integer number),
return 150
R2 n1 n2 r150

In case of r23mod return error = 1 and val = 0, so
r23mod may be read as a model, not an instance parameter
R3 n3 n4 r23mod
2022-04-26 10:33:31 +02:00
Giles Atkinson 9ac4dab81a Fix two crashes caused by trying to plot after circuit parsing failed. 2022-04-26 10:32:47 +02:00
Holger Vogt 321d53a4e9 Patch to avoid false reads and writes due to inconsitent
structs SPAN and NOISEAN.
Prevent using non-initialized variables.
2022-04-25 21:34:32 +02:00
Holger Vogt 61797c9317 Compile only when RFSPICE is selected in config.h 2022-04-25 21:33:37 +02:00
Holger Vogt 32a707fd22 Provide access to the necessary structs like cplx 2022-04-25 21:32:43 +02:00
Holger Vogt d961c7c91d add missing noisesp.c 2022-04-25 21:32:10 +02:00
Alessio Cacciatori 4ebf4901b9 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-04-25 21:31:28 +02:00
Holger Vogt a1eb0cc63d If XSPICE is not selected, still send CKTspDump(ckt, freq, spPlot),
but without ipc (spPlot instead of undefined acPlot)
2022-04-25 21:28:16 +02:00
dwarning 45d5d9a764 remove duplicate pointer allocation 2022-04-25 21:27:39 +02:00
dwarning 20abe9ca38 white spaces 2022-02-20 14:55:10 +01:00
Holger Vogt e99638c89f Remove int <--> unsigned int warning 2022-02-17 15:49:20 +01:00
Holger Vogt 4e1ae255f6 Inlude code into #ifdef RFSPICE ... #endif
to allow compiling without pre-processor flag RFSPICE.
2022-02-17 15:49:09 +01:00
Holger Vogt de572d2cdf Remove in <--> unsigned int mismatch 2022-02-17 15:48:52 +01:00
Holger Vogt c2d279a1ef Remove trailing spaces. 2022-02-17 15:48:31 +01:00
Holger Vogt 3b0eb41c74 Enable compiling with --enable-sp for RF SPICE
Set preprocessor flag RFSPICE
Add new files and directory 'dense' ('dense' is still buggy)
2022-02-17 15:48:19 +01: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
roman 74787f0c33 Fix EXTERNAL type in isrc 2022-01-17 11:32:01 +01:00
dwarning 0c34ac019f use total current for diffcap calculation 2022-01-15 16:22:42 +01:00
Holger Vogt 46696a6aaa If function is not found, bail out if strict_errorhandling is set. 2022-01-15 14:09:50 +01:00
Holger Vogt 632f8c033d Make numoparam error messages more user friendly.
Add line number of netlist to the message.

Original line number added to new lines in inpcom.c.
Internal error messages only when 'ngdebug' is set
2022-01-15 13:43:26 +01:00
Holger Vogt 0c59a77fc4 During op evaluation we might use source stepping.
Independent V and I sources are stepped, the B source however is not.

Add source stepping to B source.
2022-01-02 13:53:38 +01:00
Holger Vogt 43f2182e56 Add com_optran.h and cplhash.h to their makefile.am
to have them as part of make dist.
2021-12-30 15:08:15 +01:00
Holger Vogt c7bc84943a plug a memory leak 2021-12-23 14:38:09 +01:00
dwarning 2eaf35f633 fix a double application of device multiplier for certain diode parameter 2021-12-13 21:49:33 +01:00
Holger Vogt bff90f1498 Put the gmin reversal into the comment 2021-12-13 21:43:50 +01:00
Holger Vogt 5424fd0d43 Reverse the sequence of dynamic-gmin and new-gmin.
The old method dynamic-gmin now comes first,
new-gmin will follow when the former has failed to converge.
2021-12-13 21:43:30 +01:00
Holger Vogt d5dc757288 correct assignment of a variable value to a 1-bit-field
only by a logic comparison.
2021-12-13 21:40:57 +01:00
dwarning 26979079d4 prevent few compiler warnings 2021-12-13 21:40:15 +01:00
Holger Vogt 89eaf7739c Remove unused variables 2021-12-13 21:33:09 +01:00
Holger Vogt a420f58ef5 Plug a (potential) memory leak
Add missing memsaved
2021-12-13 21:32:46 +01:00
dwarning 8f9bf94a38 Aware of sscanf return value 2021-12-13 21:30:55 +01:00
dwarning ba6d8c871c white spaces 2021-12-13 21:30:32 +01:00
dwarning ba9f5be52c Prevent arithmetic overflow and reduce operations 2021-12-13 21:29:37 +01:00
dwarning 550e9f1a81 correct some scaling rules 2021-10-30 11:03:26 +02:00
dwarning f638a63fba save few calculation effort in diode load routine 2021-10-30 11:03:05 +02:00
dwarning 62242a5538 save few calculation effort in bjt load routine 2021-10-30 11:02:54 +02:00
dwarning 133f9c46e7 prevent unwanted fallthrough 2021-10-30 11:02:25 +02:00
dwarning ae49043fe3 correct scaling for IBC parameter 2021-10-30 11:02:13 +02:00
dwarning b15c7d29f1 correct temp update for IBE and IBC parameter 2021-10-30 11:01:51 +02:00
dwarning 01fb0ac18b introduce IBE and IBC model parameter for more accurate current calculation 2021-10-30 11:01:36 +02:00
dwarning 231e6218a5 remove comment regarding ancient leakage current defaults 2021-10-30 11:01:24 +02:00
dwarning 5ff04ee85b c2 and c4 are now aliases for B-E and B-C leakage saturation currents 2021-10-30 11:01:09 +02:00
Holger Vogt fb98f7873b remove some compiler warnings 2021-10-30 10:46:39 +02:00
Holger Vogt f3cb69403a bug 497: Prevent a crash in CPL
Forbiddeb combination of model parameters.
Details are not yet available.
2021-10-30 10:44:44 +02:00
Holger Vogt 69e2903bf6 Update to Garbage Collector for cpl
Update some comments
Insert the deleting functions
Reset pool_vi and ndn_btree
Add an example with 20 call to cpl in sequence
2021-10-30 10:44:29 +02:00