Commit Graph

7593 Commits

Author SHA1 Message Date
Holger Vogt ced6b038a5 cpl gc: Add missing files to project file 2021-10-30 10:45:58 +02:00
Holger Vogt 9806fb3b9e cpl gc: Add missing files to project file 2021-10-30 10:45:30 +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
Holger Vogt 041264df03 No more meory leaks with existing cpl examples:
Add cpldelete.c and cplmdel.c
Delete the model parameters.
Add 2 missing memsaved().
2021-10-30 10:44:07 +02:00
Holger Vogt 9ede9b80e0 Issue a warnong only when ngdebug is set. 2021-10-30 10:43:38 +02:00
Holger Vogt d2dd1950cb Add memsaved() to TMALLOC, calloc and replace CPLTFREE for tfree 2021-10-30 10:43:10 +02:00
Holger Vogt de00317e49 Add memsaved or memdelete to macros 2021-10-30 10:42:37 +02:00
Holger Vogt 8c5277a5e8 Re-format cplsetup.c 2021-10-30 10:42:09 +02:00
Holger Vogt 7dcb1b2a39 Add memsaved() to TMALLOC 2021-10-30 10:41:51 +02:00
Holger Vogt 1dddd6df8d Each TMALLOC is accompanied by fcn memsaved(). 2021-10-30 10:41:37 +02:00
Holger Vogt b142f2eb9d Add mem_init() and mem_delete() to setup and unsetup functions 2021-10-30 10:41:24 +02:00
Holger Vogt 4837773045 Add cplhash.h to project 2021-10-30 10:40:52 +02:00
Holger Vogt 3be7370fa8 Add header with extern function prototypes 2021-10-30 10:40:40 +02:00
Holger Vogt 677ec1a094 Update intro text 2021-10-30 10:40:04 +02:00
Holger Vogt d71821fd36 New readme for this branch 2021-10-30 10:39:51 +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 b9afd2bd16 add missing headers 2021-10-30 10:38:23 +02:00
Holger Vogt 684e940fc9 add cplhash.c to compile 2021-10-30 10:37:57 +02:00
Holger Vogt 2f5a00f0a5 hash functions for cpl garbage collector 2021-10-30 10:37:42 +02:00
Holger Vogt 063665c374 Fix a bug in optran code:
devname will be used in the list of instances
2021-10-29 16:41:18 +02:00
Holger Vogt 01ed224896 A check to avoid multiple entries for the same node into the .save list
Scan the data base dbs (list of saves) before a new entry is generated.
2021-10-29 16:40:51 +02:00
Holger Vogt bde0639bc4 save within subcircuit
enable V(a,b) as v(a) v(b)
2021-10-29 16:40:34 +02:00
Holger Vogt e90b3e711b F.-request 85: save currents in subcircuits
Separate handling .ic/.nodeset and .save .
Add i(Vxx) to  address translation.
Vxx#branch is not supported.
2021-10-29 16:40:23 +02:00
Holger Vogt bd0113ea9a Feature request 85: Enable .save within subcircuits
inp.c: Add .save to wl_first only after subcircuit expansion
subckt.c: treat .save like .ic
2021-10-29 16:40:06 +02:00
Holger Vogt f9b743aa2a remove compiler warnings 2021-10-29 16:39:28 +02:00
Holger Vogt 55d0657380 README.optran: optran is now standard. 2021-10-29 16:39:01 +02:00
Holger Vogt 7ce476c0ad Make optran standrad by calling com_optran during ngspice initialization. 2021-10-29 16:38:27 +02:00
Holger Vogt 36dd77f63e if step size in optran command is set to 0,
optran is deselected.
2021-10-29 16:38:08 +02:00
Holger Vogt 1eb15de584 remove optran command from spinit 2021-10-29 16:37:56 +02:00
Holger Vogt d6038ea43c Redo the transformation vswitch -> pswitch
Parsing takes default values into account, when
parameter is missing.
S vswitch --> pswitch code model
S_ST vswitch (with hysreresis) --> SW switch
S iswitch --> aswitch code model
S_ST iswitch (with hysreresis) --> CSW switch

Use string handling for replacements: allow parameter
equations in .model lines.
2021-10-29 16:37:19 +02:00
Holger Vogt bbccb4b63e Improved error message:
when argument out of range, name the term
2021-10-29 16:36:55 +02:00
Holger Vogt c895ca33f7 Pswitch: Fix a bug in resistance calculation when cntl_on < cntl_off
Correct setting of parens
2021-10-29 16:35:47 +02:00
Holger Vogt 37ef831bc9 Updated links 2021-10-29 16:32:34 +02:00
Holger Vogt 70e4d2157e New names for the (experimental) ramp-time capacitor and inductor code models 2021-10-29 16:28:57 +02:00
Holger Vogt eee639d98d Rename the capacitor and inductor code models to capacitoric and inductoric
8e4db9109 ("adms bsimbulk and bsimcmg implementation based on work from Robert Larice", 2020-12-17)
changed inptypelk.c, line 37 from strcmp to strcasecmp.
Thus Capacitor (model for C) and code model capacitor are no longer
distinguished. Model parsing for the code models fails.

These code models are used very infrequently, thus renaming them
is a valid fix.
2021-10-29 16:28:25 +02:00
Holger Vogt 6b5bc9bcd8 There is no f (femto or Farad) in a resistor line 2021-10-05 18:07:32 +02:00
Holger Vogt a87b237bff is_a_modelname() to detect a model 1N4148, if compt LT is set.
Rewrite is_a_modelname(), when LT is set: only check element lines
beginning with r and c for RKM notation of a number.

So don't use a RKM number (e.g. 4k7) for naming a resistor model.
2021-10-05 18:01:53 +02:00
Holger Vogt eb7b1fc1e7 Some typos 2021-10-05 17:54:06 +02:00
Holger Vogt 57d812afa8 Compiling for macOS
New compile scripts for ngspice executable and shared library,
using gcc-11 from Homebrew.
All relevant options are included (readline, openmp, X11 graphics etc.)
2021-09-29 20:32:02 +02:00
Holger Vogt 34c227815d RKM for C: Revert reading f, it is again femto
Examples files include expected results
2021-09-29 20:31:53 +02:00
Holger Vogt 7f981569d9 Update to RKM if ngbehavior=lt is set:
Reading C and R values follow the RKM convention with 2 exceptions:

    Upper case and lower case letters are not distinguished.

    Letters m, M denote milli (1e-3), letters Meg or meg denote 1e6.
2021-09-29 20:31:44 +02:00
Holger Vogt 6f6f2b8996 Remove double assigment to s[1]
Assignment Is either done in the loop or by *y = '\0';
2021-09-29 20:31:22 +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 df5e7e36f6 When checking for µ, truncated the line, when shifted.
Enable R470, when newcompat LT is selected.
2021-09-29 20:30:53 +02:00
Holger Vogt 3dcc36c1c3 ngspice input deck may contain special characters like µ (mu).
Detect mu for ANSI and UTF-8 and translate it to u.
2021-09-29 20:30:35 +02:00
Holger Vogt 4ce4f52938 XSPICE d_source: prevent a crash when the input file is not found 2021-09-29 20:30:10 +02:00
Holger Vogt d4c559421e prevent crash if info.node_table has not been defined,
caused by some preceding error.
2021-09-29 20:29:54 +02:00
Holger Vogt 93f904fb0b Make 'speedcheck' also available in batch mode simulation. 2021-09-29 20:29:36 +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