Correct bug in resources.c affecting times returned by rusage.
Implement HiSim 1.2 model.
Update BSim4 to 4.3.0 and enhance the BSIM4.
Update BSimsoi3 to version 3.1.1
Inhibit irritating "Warning: Pd/s = 0 is less than W." messages from BSIM3 and BSIMSOI3 when Pd/s were not specified.
Make 'show all' display 'n/a' (instead of junk) for parameters that return errors.
Fix quote-encoding so "\ " works, e.g. for filenames.
Improve 'save alli' behaviour (again!).
MacSpice now tolerates files where the last line is terminated by EOF instead of \r or \n.
The routine that checks model parameters no skips the values of unrecognised parameters instead of reporting them as errors in their own right.
Fix way 'save all' decides whether to save a node or not.
Fix evaluation of variables surrounded by brackets, e.g. 'echo ($foo)'.
Disable non-functional Edit/Undo item.
Eliminate 'miniedit' in favour of external editor as helper application. Setting the editor variable to the editor's 4-byte creator code specifies which one to use. The default is SimpleText ("ttxt"), but BBedit ("R*ch")is recommended because the features of the ODBeditor suite are available.
Make high-level events and menu items clear any text from the command line before inserting their own typing.
Upgrade semiconductor model from UFSOI-7.0 to UFSOI-7.5
Add dpi element to graph struct so that the choice of ticks on log axes is independent of device resolution. Inhibit '20' ticks per decade option for log-axes (it works, but it puzzles too many people).
Improve way 'save all' decides whether to save a node or not.
Correct problem in lexer() that prevented 'print @c2[p]' being tokenised correctly.
Fix bug in pole-zero calculation introduced by new sparse matrix code.
Insert code to prevent 'edit' opening a file larger than the 32KB TextEdit buffer. Add a File/Close menu item so one can exit 'edit' using Close instead of Quit.
Fix a problem with initialising the more/pager. This was evident when the output of 'show' was redirected to a file, e.g. 'show all > foo'.
Upgrade sparse matrix code, with subtle improvements in speed and accuracy.
Make 'echo -n' fflush().
Stomp another bug in deriv().
Make the interactive tf and sens commands case insensitive.
Improve the accuracy of the sub-divisions drawn on plots with log scales.
Improve the end-of-range behaviour of interpolate() and install a warning that is issued when it is used to extrapolate outside the old range.
Fix various bugs in deriv() that cause wrong answers and crashes.
Fix frontend command interpreter so it recognises that the brackets protect the semicolons in expressions like 'foo = ( 1 ; 2 ; 3 )'. Also correct the lexer() so that 'foo[bar]' works as well as 'foo[ bar ]' when referring to vector elements.
Enhance tokeniser, etc. to allow node names with 'funny' characters. e.g. '-5V' is now accepted as a valid nodename.
Reduce time wasted in poly() translation by skipping tokenisation of lines that can't possibly be poly's.
Cure parser leaks that occurred when B sources contained syntax errors.
Fix some memory leaks associated with subcircuit expansion. Repair subcircuit expansion so devices with variable numbers of nodes don't cause trouble.
More memory management improvements. Malloc(), etc., now releases fixed length pools and behaves in way that should result in less heap fragmentation. 'Rusage' no longer treats unallocated memory in pools as in use, because it is available to malloc(). The Rusage report includes application heap memory used by the console display.
Tidy up libraries to prevent spurious link-warnings.
Improve memory management in the front-end control structures.
Improve precision of memory usage statistics ('rusage', etc). The value of current dynamic memory usage now excludes memory that has been reserved by MacSpice but not yet allocated by malloc() et al..
Cure the memory leaks associated with graphical plots.
Fix parsing of commands like 'foo = foo + 1' where 'let' has been omitted.
Improve matrix re-ordering algorithm to speed up processing of large matrices.
The 'status' command now indicates if a condition is tied to a particular analysis.
Fix crash which occurred in unusual circumstances, due to plotEnd() not checking for a null pointer.
Interrupting a .tran simulation now prints useful info about current timepoint and timestep.
New 'nodesets' command to save the state of the current analysis as a file of nodeset commands suitable for inclusion in a netlist. The syntax is 'nodesets filename'.
Improve speed of loading phase of circuits with large numbers of nodeset/ic statements.
Make a few tweaks to the way the 'save' command behaves.
Make batch emulation mode create saves from the dotcards in the deck in a more authentic manner.
Install adaptive timers in the event-loop handling; no more long periods of locking up the Mac when processing large netlists.
Install additional memory management diagnostics and instrumentation.
Fix memory leak related to error messages.
Improve the consistency of the line numbers given by the 'listing' command.
Fix problem with sourcing a large circuit caused by an inefficient tree constructed by smartfree().
Add mac_ascii as a recognised value for the frontend variable 'filetype'. This will cause ascii files created by write to have mac style endline termination. Tweak the routine that reads in rawfiles so it can handle any of the three possible formats.
Source files can now be either mac or unix types.
Alter the behaviour of the save statement qualifiers. 'allv' is now the default and saves only external nodes. 'all' saves both internal and external nodes.
Improve the event-loop polling so that large circuits don't lock up the machine.
Make some modifications to the sparse matrix structures to lay the foundations for future improvements.
Modify the tokeniser to allow / * ^ in node names. This is needed for compatibility with ext2spice and some benchmark files, it doesn't make using these in nodenames a good idea.
Fix bug in .include code which ignored first line in some cases.
Fix problems with BSIM3 (caused by one of my experiments).
Fix the 'show' command so it works with devices in subcircuits in the way the manual says it should.
Improve the coding of the BJT model to eliminate various discontinuities that were preventing difficult benchmarks running.
Improve the coding of the D model to eliminate some discontinuities and calculate derivatives correctly. Also fix the behaviour of the IBV and BV parameters when the emission coefficient is not unity.
Improve the step limiting of pn-junctions
Add transient analysis check that the maxorder option is compatible with the integration method.
Fix various bugs in the MOS3 device.
Make the 'debug' variable behave in a more intuitive (i.e. less sticky) manner.
Improve recovery from interactive commands with missing terminating quote.
Fix various problems that arise with 'listing' when source files contain long lines. Also improve the handling of things when continuation cards create excessively long lines.
Fix bug associated with dragging a file onto the application.
Fix 'where' command so it now gives useful information.
Improve layout of messages generating when source/gmin stepping to make it a bit clearer what is going on. Add 'where' message in case of failure.
Implement a new multistep-multiorder algorithm. The Berkeley version never actually used any order higher above 2.
Correct the "Transient iters per point" message to say "... cur point"
Inhibit redundant recalculation of the integration coefficients during transient analysis.
Improvements to com_load so it handles ascii files properly. Limit the 'Bad rawfile' message to being issued once. A bad rawfile will cause memory leaks at the moment.
Further tweaks to the handling of ccom structures for plots.
Reorder the ccom structure so all (?) commands are registered.
Fix BSIM1 and BSIM2 so that vbs, vgs and vds parameters return actual values, not initial values.
Correct mishandling of internal nodes which resulted in internal nodes not being created in some instances. This seems to be a very common bug in many spice derivatives
Fix rare problem with node lookups by making hash() insensitive to case.
Fix log(0) problem in BJT noise analysis.
Fix crash caused by freeing the command line wordlist twice in some circumstances.
Fix the local truncation error code. Something was clearly not right with the Spice original so I reworked the math through from scratch. With hindsight, the original code contained two fundamental bugs, plus what seem to be a couple of empirical 'hacks' (e.g. TRTOL) that roughly compensate for them, in some cases.
Reduce event loop handling overhead. Compared with LEVEL 12, speeds up the Ring11 bench mark by a factor of about 1.5 and my frontend benchmark script by a factor of about 5.
Improve the way memory is managed when analysis vectors are saved. Speeds up analyses that create long vectors significantly. Ring11 now factor 2.0 faster than LEVEL 12 version.
Fix 'save all' so that it omits internal node voltages. Add new wildcards so 'save alli' saves the internal currents of devices and 'save allv' is a synonym for 'save all'
Fix more memory leaks mainly affecting subcircuit and model expansion.
Add timestep to the debug options. This should identify nodes and devices that responsible for cutting (i.e. reducing by a factor eight or more) the timestep.
Prevent the "Do you want to save?" dialogue from appearing at Quit time. It should still appear if you run out of memory to give you a chance to see what was going on at the time.
Fix problem with the BSIM3 MOSFET where if tnom was specified for a transistor model, it increased by 273.15 degrees each time a simulation was run.
Smooth out some discontinuities in the BJT model.
Fix a crash that occurred when creating large vectors using the (1;2;3;...) syntax.
Fix problems introduced into 'print' and 'write' commands by previous patch.
Fix intermittent crash that occurred in rare circumstances when destroying a plot.
Install and validate:
M - level 44: EPFL-EKV v2.6 MOSFET Model
More leaks fixed.
Change the '*' pseudo-filename to '#' to fix incompatibility with the glob code.
Define files of type 'BDAT' which are opened with 'load' when double-clicked. Files of type 'TEXT' are opened with 'source' when double-clicked). Modify icons appropriately, although you won't see this until you rebuild your desktop.
Make inpfindlnew() print errors to cp_err and handle 'missing level' error message correctly.
Fix various problems with 'write'. This now creates files of type 'BDAT' and uses unix-style line breaks ('\n'). This will enhance compatibility with Mark Widholm's MathPad. Also, fix a mistake I made a couple of patches ago that broke the vector names in the rawfile output and deal with the memory leaks associated with 'write'.
Fix more bugs in 'alter' so that commands like
MacSpice 1 -> alter @vin[sin] = (0.123;45;6.78)
work appropriately.
Add check to PWL voltage/current sources that prints a warning if the list is not in increasing order of time.
More leaks fixed.
Install UFS01-7.0 model and correct a couple of minor bugs.
Add ^U (clear line) to the command line editing operations.
Fix bug that made AC analysis of lossless ltra transmission line give incorrect results.
Fix command line editor to display history entries containing quote protected characters
Fix b source parser bug that caused things like 'i=v(1,2)*v(3)' to leave the tokeniser in an active state.
Make the "foobar: No error" message more informative, it meant there was an error opening foobar.
Fix a couple of instances where string constants were freed. It wasn't doing harm, but lets face it, it's not a good thing to do.
Improve 'batch emulation' mode.
Minor tweaks to the way more-style paging works. It's still rather primitive.
Improve behaviour of 'show' command.
Get 'show -v' command working correctly.
Fix intermittent crash that occurred when 'destroy all' was used.
Install new, and update existing models. The current list is
A - level 3: STAG SOI v2.6 http://www.micro.ecs.soton.ac.uk/stag/
M - level 8: BSIM3v3.2.4 http://www-device.EECS.Berkeley.EDU/~bsim3/
M - level 9: BSIMSOIv3.0 http://www-device.eecs.berkeley.edu/~bsimsoi/
M - level 10: UFSOI-6.0 http://www.soi.tec.ufl.edu/
M - level 14: BSIMS4v4.2.1 http://www-device.eecs.berkeley.edu/~bsim3/bsim4.html
J - level 2: Parker-Skellern mesfet jfet model http://www.elec.mq.edu.au/cnerf/models/psmodel/
Z - level 5: HFET
Swap effect of up- and down-arrow keys so they work as advertised below.
Extend command/file completion so that it performs history replacement.
Install Anthony Parker's 'spec' command
Make '*' into a pseudo-filename signalling that the file is to be chosen using a dialogue box. There are some rough edges, e.g. if file foo.txt exists and you want to append some text to it:
echo "hello" >> *
requires you to type foo.txt into a dialogue box and then warns that foo.txt will be messed with, which you know already.
Implement 'cd' command which prints and selects the default directory.
Implement command and file completion, and command-line editing keystrokes:
| CTL-A | move cursor to start of line |
| CTL-B or left-arrow | move cursor back one char |
| CTL-D | delete forward from insertion point |
| CTL-D at end of line | prints a list of possible completions |
| CTL-F or right-arrow | move cursor forward one character |
| CTL-H | delete back from insertion point |
| CTL-K | delete from cursor to end of line |
| CTL-N or down-arrow | scroll down through history stack |
| CTL-P or up-arrow | scroll up through history stack |
| ESC or TAB | automatically types the completion as far as possible. |
Text outside the editable region can be selected, but the cursor won't stay there. 'ignoreeof' is now set by default because it is rather too easy to type CTL-D at the command prompt and lose everything otherwise. To get a list of all commands type a space followed by CTL-D at the prompt.
Add feature that converts spice 2 'poly' sources to spice 3 'b' sources. This was not as easy to do as you probably imagine, so please check the results carefully.
Improve several commands' general awareness of the console size so that 'more', etc. work in a more elegant manner.
Add new 'delcirc' interactive command to delete circuits and free their memory. Its syntax is like that of setcirc.
Enhance the DC convergence performance by implementing adaptive step-size selection for source stepping. Adaptive gmin-step sizes can be invoked by setting the option 'gminstepsize = 1'
Improve the arbitrary source ('b' devices) code in various ways which roughly double their evaluation speed, halve their memory consumption, and fix problems with the x^y function and parser bugs that prevented it working with node names that start with a number (e.g. 23b). Deal with the bug that broke expressions containing no sources (e.g v=1.234 ).
Make the switch device work better by getting it to update the breakpoint table.
Alter the way source files with non-unixy names that are dragged onto the application are converted into 'source' statements. In really bad cases (non-ascii characters) they are turned into 'source *' so you get presented with a navigation dialogue and you can drag the thing into that. It is better to stick to ascii filenames really...
Overhaul frontend to eliminate unnecessary copying of wordlists which was wasting memory and slowing things down.
Fix more memory leaks.
Fix a nest of bugs that affect 'save' statements and debugging. Most noticeable will be the fact that duplicates of the same saved vector are now recognised.
The implementation of the various DOING_something flags never seems to have been completed in the 3f4 original source. A lot of things read these flags, but they were left unset most of the time when they were needed. A preliminary attempt to sort this out has cured several old problems (e.g. @c1[i]). Let's hope it doesn't cause new ones.
Fix bugs that resulted in miscalculation of truncation error for trapezoidal and Euler integration, and hence timestep. Reset default TRTOL which was a Berkeley hack to cure the symptoms from 7.0 to 1.0.
Fix bug that prevented interactive analyses from using any options other than the hardcoded application defaults. Interactive analyses are now given a copy of the options for the 'current circuit', which is what one would expect.
Make the front end error message that appears if i(foo) can't be evaluated more informative.
Fix segmentation violation in sensitivity analysis
Cure 'alter' of its habit of misbehaving when given incorrect arguments.
Modify SIOUX so that the whole line is entered, even if the cursor is left in the middle of a command (after editing).
Add more character filtering mini-edit to try and prevent invisible junk characters being a problem. I feel to that mini-edit could be beneficially replaced by a scriptable editor, sometime...
Fix bug anti-leak measures introduced at PATCHLEVEL 4. The comma operator was unreliable, e.g. 'print v(1,2)' caused errors. This was because mkfunc() wasn't using ud_count to register the copies it was making of its argument.
Fix various bugs in 'let' which prevented expressions like 'let foo[2] = 99' working and incorporate index range checking.
Define a semicolon operator to facilitate construction of vectors and n-dimensional matrices. e.g. the commands
MacSpice 1 -> let foo = ((11;12);(21;22))
MacSpice 2 -> let bar = (foo;(31;32))
MacSpice 3 -> let baz = (1;(3,4);5)
create a 2×2 matrix 'foo', a 3×2 matrix 'bar', and a complex vector with 3 elements 'baz'. It is necessary to protect the ; with ()'s to prevent it being treated as a command separator.
Rewrite tmalloc() so it is based on calloc().
Fix bug in checking code that could cause rejection of a valid tran parameter.
More memory leaks fixed!
Fix more frontend leaks. Overhaul the commands related to define in order to fix more leaks. After some false starts, concluded that a reference counter field is needed in the pnode struct in order to indicate that its dvect has been added to a plot. free_node() can exploit this information when destroying parse trees. Educate prtree1() about when brackets are needed when pretty-printing user function definitions (okay, but they were starting to really irritated me!)
After a lot of careful leak fixing the command loop
repeat 10000
define f(a,b) 100*b+321*a
let k = f(j,j+4)
undefine f
end
seems to execute without leaks.
Many improvements and fixes to the command processor in front.c, it may even work well enough to be usable now!
Fix some memory leaks. Prior to fixing the loop
let j = 0
while j < 1000
let j = j +1
end
leaked 320 bytes per loop.
Fixing free_pnode to free the pn_name, saved ~70 bytes/loop.
Preventing cp_istrue() from creating a copy of the word list wl which is never used.
Com_let() needed a lot of patches which brought the leak rate down to 68 bytes per cycle.
Fixing mksnode() cured the rest.
Make setting the 'echo' variable do something useful. It now prints the parsed command and the fully expanded version.
Fix the bizarre buffer problems that used to occur after an interrupt (ctrl-c, etc) by replacing a call to getc().
Setting the cpdebug variable no longer complains pointlessly that its messages aren't available, because they are.
Add checks to the 'where' command to stop it causing crashes if it is invoked when there is no unconverged node to report.
Replace perror() calls following file-open activity with macro PERROR which replaces a confusing "No Error" message (because errno is not set in the Metroworks ANSI libraries) with "Error: Can't open file:"
DR3:
Fix crash when resume typed and no file loaded.
Various patches applied.