Commit Graph

7669 Commits

Author SHA1 Message Date
Holger Vogt 27565f77ea Add other integration methods to the example
We have: meas, integ, and code model INTEG
2021-12-13 14:54:57 +01:00
Holger Vogt 6d80356c28 Add function integ to control language
Trapezoidal rule for integrating a vector.
2021-12-10 22:06:27 +01:00
dwarning dba9e7c491 fix a double application of device multiplier for certain diode parameter 2021-12-10 13:42:53 +01:00
Holger Vogt c74eb5d1cc re-enable parameters in agauss function
fixes bug #564 reported by Stefan Schippers

If nested braces {..{  }...} have been created,
replace the inner { } by ( )
2021-12-09 16:56:00 +01:00
Holger Vogt a70a2e2a3f hcopywidth and hcopyheight failed with SVG plot
cp_getvar read CP_NUM, not CP_STRING
Patch #108 contributed by Giles Atkinson

Add hcopywidth and hcopyheight to example nmos_out_BSIM330_svg.sp
2021-12-07 15:16:03 +01:00
Holger Vogt 92b1e5f551 Make error message more verbose 2021-11-29 11:12:15 +01:00
Holger Vogt 913b7edc2a .probe: Add more safeguards to prevent crashes
in case of wrong user input
due to obtain empty lines in shared ngspice
2021-11-29 11:11:58 +01:00
Holger Vogt 0e5ab05e72 .probe: various example netlists 2021-11-28 17:18:50 +01:00
Holger Vogt bfad717ca5 Enable math characters also in tokens like i(z/z) by
temporarily putting " around the token.

Improve error message on missing vector
2021-11-28 17:13:23 +01:00
Holger Vogt 2e864ab221 .probe: Add function call to modprobenames()
Function resides in inpc_probe.c.
The function renames all current measurement instances
vcurr_instance:node#branch to instance:node#branch by
modifying the global instance table (tab).
2021-11-28 17:06:02 +01:00
Holger Vogt 0a5d5bf0f1 .probe: Add call to function inp_probe() which resides
in inpc_probe.c.

Make function insert_new_line() non-static

Enable detecting the number of nodes in x-lines
(calls to subciruits) in function get_number_terminals()
2021-11-28 16:47:14 +01:00
Holger Vogt 2c3f2357de .probe: Add the new file inpc_probe.c to the VS project files
and makefile.am in ngspice/src/frontend
2021-11-28 16:38:41 +01:00
Holger Vogt e81ec850de New dot command .probe:
Code to enable current measurements at all top level
device pins and to enable differential voltage measurements
between two (arbitrary, top level) device nodes.

Adds 0 V voltage sources for current measurements to selected or all
device nodes at top level (including X lines)

Adds an E source excited by two arbitrary nodes for differential
potential (aka voltage) measurements between these nodes

Function inp_probe() is called from inpcom.c
2021-11-28 16:32:49 +01:00
Holger Vogt 02653e1f83 Update to previous commit: safeguard against no circuit loaded 2021-11-28 14:41:04 +01:00
Holger Vogt 271b1e99f6 Fix a bug: Crash when 'settype @d1[id]' is given,
but simulation is not yet run.

Add a better check for having at least one simulation run
2021-11-27 23:25:40 +01:00
Holger Vogt ede5942e6e Update to previous commit: corrected and enhanced warning messages 2021-11-27 23:06:15 +01:00
Holger Vogt 4b495bacd3 Fix a bug: Crash when 'settype @d1[id]' is given,
but simulation is not yet run.

Ask for the job before acknowledging settype on
a vector starting with @
2021-11-27 15:55:43 +01:00
Holger Vogt 0ac7c442ce evtprint: prevent a crash when eprint has been called
but there is no simulation run.
2021-11-23 16:01:49 +01:00
Holger Vogt 1685ab0159 Put the gmin reversal into the comment 2021-11-23 16:01:28 +01:00
Holger Vogt 6c7675ba88 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-11-23 16:01:07 +01:00
Brian Taylor 2fdc09a3aa Fix typo in the diode/README file. 2021-11-23 15:38:34 +01:00
Brian Taylor 5a5987daca Fix pz1.cir test so that the Cider OP data file is saved and the PZ analysis is run. 2021-11-23 15:38:16 +01:00
Holger Vogt da21001268 Enable math characters in vector (node) names for command fft
Replace ft_getpnames() by ft_getpnames_quotes().
2021-11-06 13:08:30 +01:00
Holger Vogt bcfa946035 Enable math characters in vector (node) names for logic comparison
Replace ft_getpnames() by ft_getpnames_quotes().
2021-11-06 13:08:14 +01:00
Holger Vogt e842bd5a87 Enable math characters in vector (node) names for command alter
Replace ft_getpnames() by ft_getpnames_quotes().
2021-11-06 13:07:49 +01:00
Holger Vogt 2498d30088 Enable math characters in vector (node) names for command fourier
Replace ft_getpnames() by ft_getpnames_quotes().
2021-11-06 13:07:26 +01:00
Holger Vogt a420ec4dab Enable math characters in vector (node) names for command spectrum
Replace ft_getpnames() by ft_getpnames_quotes().
2021-11-06 13:07:04 +01:00
Holger Vogt 3e725b00e7 Enable math characters in vector (node) names for commands
write and print
Replace ft_getpnames() by ft_getpnames_quotes().
2021-11-06 13:05:39 +01:00
Holger Vogt 44c2e6295c Enable math characters in vector (node) names for plotting
Replace ft_getpnames() by ft_getpnames_quotes().
2021-11-06 13:02:46 +01:00
Holger Vogt b999b0ea75 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-11-06 13:01:16 +01:00
Holger Vogt 93e8ac6488 correct assignment of a variable value to a 1-bit-field
only by a logic comparison.
2021-11-01 23:10:35 +01:00
Holger Vogt 10a7fcb08f struct TSKtask: group all single bit fields together 2021-11-01 23:09:30 +01:00
Holger Vogt 6fd441bd8a Merge branch 'pre-master' of ssh://git.code.sf.net/p/ngspice/ngspice into pre-master 2021-11-01 19:07:02 +01:00
dwarning 53e6dc4fe2 prevent few compiler warnings 2021-11-01 18:12:54 +01:00
Holger Vogt ec0a2bae93 Update on macOS, prepare ngspice-36 2021-11-01 15:48:22 +01:00
Holger Vogt 5e6e0b4b16 Update on macOS, prepare ngspice-36 2021-11-01 14:48:21 +01:00
Holger Vogt 0da54eb641 Updating compile scripts for macOS
Use either built-in Clang (without OpenMP) or
Homebrew gcc-11.
2021-11-01 14:48:01 +01:00
Holger Vogt 29ef622874 Remove memory leaks 2021-11-01 14:01:31 +01:00
Holger Vogt 0dfb9bda66 Update, add libraries required 2021-11-01 13:47:31 +01:00
Holger Vogt 51f3f779a8 Remove unused variables 2021-11-01 11:44:43 +01:00
Holger Vogt 6f83ad179f Plug a (potential) memory leak
Add missing memsaved
2021-11-01 00:27:18 +01:00
Holger Vogt f2311b96a3 Remove memory leak
Free some tokens generated by CNVget_token
Initialize reset and clk

Still missing: free 'states'
2021-11-01 00:07:49 +01:00
Holger Vogt 0b9d86afb8 Remove memory leak
Add callback function free_local_data
Free some tokens generated by CNVget_token
2021-11-01 00:05:42 +01:00
Holger Vogt fcf7744c01 Revert "remove memory leak"
This reverts commit 8ccdfab48c.
2021-11-01 00:02:14 +01:00
Holger Vogt 115909fe5f Revert "remove small memory leak"
This reverts commit bcaa6e6c2b.
2021-11-01 00:02:08 +01:00
Holger Vogt bcaa6e6c2b remove small memory leak
free token generated by CNVget_token

Still missing: free 'states'
2021-10-31 16:09:26 +01:00
Holger Vogt 8ccdfab48c remove memory leak
Add callback function to delete locally malloced memory
2021-10-31 16:05:42 +01:00
dwarning e22c05a4b6 Aware of sscanf return value 2021-10-31 15:05:29 +01:00
dwarning f75d23a644 white spaces 2021-10-31 14:59:16 +01:00
dwarning 69a76bc30e Prevent arithmetic overflow and reduce operations 2021-10-31 14:47:04 +01:00