Commit Graph

7854 Commits

Author SHA1 Message Date
Holger Vogt 06136d2d02 Set the default line width for grid and graph to 1.
0 is possible but seems to be too thin for reasonable plots.
2021-07-05 14:25:13 +02:00
Holger Vogt 5083954fa1 Example input file for analog delay 2021-07-05 14:24:58 +02:00
Holger Vogt 028dd0ab88 Remove unused
Add a delay of half a time step to reduce error
2021-07-05 14:24:46 +02:00
Holger Vogt abc6eb56f3 Plausibility checking
Enforce out=in when delay == 0
2021-07-05 14:24:29 +02:00
Holger Vogt fbab9a0fe2 Add an analog delay source for transient simulation
Internal circular memory of size tstop/tstep or user defined.
(aprox.) every tstep a value is stored.
Delay time in multiples of tstep, by control voltage or user defined.
Dc or ac sim will simply connect input to output.
2021-07-05 14:24:06 +02:00
Holger Vogt 0d2d034eb2 Add devices s and w to previous commit.
R and C are not yet covered here, due to the many
varieties available.
2021-07-05 14:23:52 +02:00
Holger Vogt c033298db9 Don't replace a device model name by a parameter, if both
have the same names.

This is an extension to commit
7706889a0 ("inpcom.c, fix bug no 384 do not quote fourth
token in f, h lines otherwise if dev name equals param
name parsing fails", 2018-12-08)

Fixes bug 327 reported by T. Edwards at
https://github.com/google/skywater-pdk/issues/327
2021-07-05 14:23:23 +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 5e8ae680db Don't do gr_redraw twice (for non-X11 is already
done in gr_resize)
Add a function DevFinalize() to add the closings in SVG or PS
files ("/> or "stroke"), when files are generated by the
plot window in MS Windows.
2021-07-05 14:22:33 +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 1176bdb0b0 Bug: Plot window switching did not change the plot content.
Enable plotting the current graph to svg or ps by selecting
the graph from the current plot window.
2021-07-05 14:21:47 +02:00
Holger Vogt 604c4624d1 Within a single run, allow multiple plots with different names:
Add an increasing number to the id file name.
2021-07-05 14:21:16 +02:00
Holger Vogt 0f4d953950 Open mrdump file not in append, but in write mode 2021-07-05 14:20:55 +02:00
Holger Vogt 273b773280 New pswitch is not compatible to iswitch
Keep the old aswitch until a modified pswitch is available.
2021-07-05 14:20:31 +02:00
Holger Vogt 93f6a50553 New author 2021-07-05 14:20:14 +02:00
Holger Vogt 22a516bc4d New author 2021-07-05 14:19:56 +02:00
Holger Vogt d36fcaf34c Neew pswitch with patch 0001-pswitch-fix.patch from Jube 3rd, 21 at
https://sourceforge.net/p/ngspice/discussion/127605/thread/d55d2322f2/#c966/b802/4764/2540/3b3f/04a4/bc51/3a68

Input resistance, numerically computed derivatives with auto-partial, reasonable limits.
2021-07-05 14:19:43 +02:00
Holger Vogt 5cc5e351f1 prepare for the new pswitch with g, gd input 2021-07-05 14:19:28 +02:00
Holger Vogt 9abb61d6ac Bug fix for %i(node1) in an A instance.
Don't do i() replacement in an A instance as shown above.
2021-07-05 14:19:12 +02:00
Holger Vogt e0d5d98b33 Just a reminder that truncation is currently diabled for CSW 2021-07-05 14:18:40 +02:00
Holger Vogt c46676d06e If compatmode PS is set, translate vswitch and iswitch to pswitch.
This reverts commit 025a9fe59 ("Partially undo commit [ab778d] : revert to aswitch as vswitch replacement", 2020-11-22)
Successful OpAmp tests vote for pswitch.
Enable iswitch.
2021-07-05 14:18:30 +02:00
Holger Vogt f12592871a Set derivative d out/d contrl to 0 if outside of switching range.
Disable auto derivatives.
Enable algorithmic derivatives.
2021-07-05 14:18:08 +02:00
Holger Vogt db5395032f Avoid model warning for C if compat flag lt is set. 2021-07-05 14:17:49 +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 14402ffc96 Update to
6034c2bcd ("Internal global variable Infile_Path
is a file search path made available for the code models.
It is set when command 'source' is used.", 2021-04-17)
Correct path to variable.h
2021-07-05 14:17:01 +02:00
Holger Vogt 6d9876229c Fixes bug #331
Bug detected and analysed by Arsen Liash
Patch provided by Yurii Demchyna
2021-07-05 14:16:35 +02:00
Holger Vogt c75e4129f4 Plug another memory leak in LTRA transmission line 2021-07-05 14:16:17 +02:00
Holger Vogt 5619665106 Remove double defined xrcv 2021-07-05 14:15:48 +02:00
Holger Vogt 5d39ff2d8c Plug memory leaks in transmission line LTRA 2021-07-05 14:15:20 +02:00
Holger Vogt d2ac525f52 Plug some more memory leak in TXL transmission line. 2021-07-05 14:14:38 +02:00
Markus Mueller 74ba5c1f96 found non-initialized value! 2021-07-05 14:14:15 +02:00
Markus Mueller 5c71349bad remove dead assign statements, yet just commented them out for the time
being
2021-07-05 14:14:00 +02:00
Holger Vogt c0bd7ca6e2 Plug a memory leak in TXL transmissiom line (y device) 2021-07-05 14:13:44 +02:00
Holger Vogt dca52aea3a Remove double defined xrcv 2021-07-05 14:13:07 +02:00
Holger Vogt b5054cc9f1 Plug a memory leak
Add function HICUMdelete() to remove model->HICUMversion
2021-07-05 14:12:46 +02:00
Holger Vogt 7dd96c241c PSPICE MC parameters are not (yet) supported, so remove them
from .model (lot, dev) and netlist (.distribution)

Triggered by Patch #104 by Giles Atkinson
2021-07-05 14:12:09 +02:00
Holger Vogt 58bdf9e0e6 Remove 'goto end' and 'end:' statements. 2021-07-05 14:11:48 +02:00
Holger Vogt c2d11728c4 enable usage of parameters in .options lines. 2021-07-05 14:11:26 +02:00
Holger Vogt 78eee72b36 .temp could not apply params like
.ttemp {tmpparam}:
move evaluation of .temp to a later stage
2021-07-05 14:11:03 +02:00
Holger Vogt d0da4bebd3 make variable 'dir' local 2021-07-05 14:10:44 +02:00
Holger Vogt 11d3188e19 fix typo 2021-07-05 14:10:20 +02:00
Holger Vogt 4fd7de9e34 Partially re-introduce and improve code that has been
inadvertently deleted in commit

83592c456 ("unify the evaluation of '.options scale=xx'
.option in a netlist will override 'options' from spinit,
.spiceinit or a script '.options scalm=xx' yields a warning,
it is not supported.", 2021-04-05)

The code transforms the option statements and adds them
to the current circuit.
2021-07-05 14:09:56 +02:00
dwarning 6bafdf70d5 sub-coll junction calculation only if ISS given 2021-07-05 14:09:35 +02:00
Holger Vogt 3a908c76ef Prevent crash, refName may be NULL 2021-07-05 14:08:41 +02:00
Holger Vogt 98f8a4fcb2 Improve error message, if occuring during op 2021-07-05 14:08:25 +02:00
dwarning 4ca4b43801 simplify while loop for subckt diode and bjt models 2021-07-05 14:08:02 +02:00
Holger Vogt c8db059144 Use 'm' and 'multi' correctly in PDKs
If there is alraedy m=xx in a subcircuit instance line,
replace it by m='m*xx' to aknowledge the additional m.

Tested with an (old) TSMC PDK and with Skywater PDK.
2021-07-05 14:07:46 +02:00
dwarning 1f95e12142 Value stored to vsub is never read 2021-07-05 14:07:26 +02:00
dwarning 52f4244345 fix Vcrit calculation for coll-subs junction and correct tlev=3 temperature model 2021-07-05 14:07:14 +02:00
dwarning b00fa921ac rm depreciated storage class 2021-07-05 14:06:52 +02:00