Commit Graph

2219 Commits

Author SHA1 Message Date
dwarning daa270d4a0 correct header entry 2023-01-23 12:58:50 +01:00
dwarning cc84401ee6 bsim4 version update from 4.8.1 to 4.8.2 2023-01-23 12:58:45 +01:00
Holger Vogt 9d391bd046 Revert "Change the default model parameters so that reasonable"
This reverts commit 738e351f59.
2023-01-23 12:57:55 +01:00
Holger Vogt 738e351f59 Change the default model parameters so that reasonable
0.35µm transistor characteristics are achieved.

QUA preocessing is untouched.
2023-01-20 11:17:14 +01:00
Holger Vogt 864e722f4a For memcpy in PREDICTOR 2023-01-06 17:28:39 +01:00
holger aacd4350c3 Prevent memory leak while "PREDICTOR" is selected 2022-12-27 18:02:04 +01:00
dwarning 96ba61ae1e add instance parameter mulu0 for mobility reduction bsim4.5 and 4.6 2022-12-22 14:19:50 +01:00
Pascal Kuthe e8cca6900b slightly optimize predictor 2022-12-16 21:55:21 +01:00
Pascal Kuthe bca48b5e78 ensure compilation succedes without OSDI 2022-12-16 21:55:21 +01:00
Pascal Kuthe c90f791a5f removed unneded changes 2022-12-16 21:55:21 +01:00
Holger Vogt 5034cf5923 Move reference designator from A to N
replace inp2n by a copy of inp2a
OSDI is now called in case N: in inppas2
2022-12-16 21:55:19 +01:00
Pascal Kuthe b28708cf82 prototype for Verilog-A integration using OSDI and OpenVAF
This initial prototype is capable of performing DC, transient and AC
analysis. Not all features of OSDI are supported yet and there are still
some open questions regarding ngspice integration. However many usecase
already work very well and a large amount of CMC models are supported.
The biggest missing feature right now is noise analysis.

test: test case for diode DC working with SH

test: add transient analysis to osdi_diode test

test: added docu text to osdi_diode test

test: added test case directories

fix: bug in osdi_load

test: small change to netlist

fix: implement DEVunsetup

fix: correct behaviour for MODEINITSMSIG

test: osdi diode enable all analysis modes

removed netlist

ignoring test results

added the build of the diode shared object to the python test script

deleting old stuff and always rebuilding the shared object

added diode_va.c to the repo

preparing CI

Create .gitlab-ci.yml file

(testing) add res, cap and multiple devices test

feat: use osdi command to load files

Previously OSDI shared object files were loaded from fixed directories.
This was unreliable, inconvenient and caused conflicts with XSPICE.

This commit remove the old loading mechanism and instead introduces the
`osdi` command that can load (a list of) osdi object files (like the
codemodel command for XSPICE). A typical usecase will use this as a
precommand in the netlist:

.control
pre_osdi foo.osdi
.endc

If the specified file is a relative path it is first resolved relative
to the parent directory of the netlist. If the osdi command is invoked
from the interactive prompt the file is resolved relative to the current
working directory instead.

This commit also moves osdi from the devices folder to the root src
folder like xspice. This better reflects the role of the code as users
may otherthwise (mistakenly) assume that osdi is just another
handwritten model.

test: update tests to new command

fix: do not ignore first parameter

feat: implement log message callback

fix: don't generate ddt matrix/rhs in DC sweep

fix: missing linker script

update to osdi 0.3

(testing) simplify test cases, fix bug

(testing) multiple devices test improvement

(testig) node collapsing bugfix

test: increase tolerance in tests

feat: update to newest OSDI header

fix: temperature update dt behaviour

fix: ignored models

fix: compilation script

fix: allow hicum/l2 to compile with older c++ compilers

fix: set required compiler flags for osdi

fix: disable x by default

fix: add missing SPICE functions

fix: update diode to latest ngspice version

feat: implement python CMC test runner

doc: Add README_OSDI.md

fix: make testing script work with python version before 3.9

fix: free of undefined local variable

fix: do not calculate time derivative during tran op

update osdi version

fixes for compilation on windows
2022-12-16 21:55:17 +01:00
Holger Vogt 1b121307c8 Remove unused variable debarr.
Add another example.
2022-12-04 10:41:22 +01:00
Holger Vogt c8ba722117 Add a function ddt (derivative versus time) to the B-source funtion parser. 2022-12-04 10:41:06 +01:00
Brian Taylor 63a937aa06 Add B-source note 2022-11-28 22:32:27 +01:00
Holger Vogt f7c038466b The 8th parameter on a voltage or current source now is 'number of pulses'.
Previous usage had been PHASE, introduced by XSPICE, which has
been redundant to DELAY. PHASE is again available when compatibility flag
xs has been set.
2022-11-24 14:46:54 +01:00
Holger Vogt 8e5c76d8b3 Add error messages when controlled_exit is called:
No exit without message.
2022-11-16 11:37:35 +01:00
Pascal Kuthe ffe920117c calculate log frequency sweep such that start frequency and stop frequency are always exactly included 2022-11-14 11:34:49 +01:00
Pascal Kuthe c4247c4353 fix: allow hicum/l2 to compile with older c++ compilers 2022-11-14 10:25:03 +01:00
Holger Vogt 743f20d04b Add new functions for operators x**y or x^y
compatmode hs: x>0 pow(x, y), x<0 pow(x, round(y)), X=0 0
compatmode lt: x>0 pow(x, y), x<0 pow(x, y) if y is close to integer, else 0
2022-11-12 14:35:26 +01:00
Holger Vogt 539176bf15 remove unused 2022-11-11 13:41:10 +01:00
Holger Vogt d6650e66f0 To find the nearest integer, use nearbyint(). trunc() has delivered
only one-sided answers.
2022-11-11 13:21:21 +01:00
Holger Vogt 5adef0cf36 AlmostEqualUlps setting has been too strict: it failed in MINGW gcc.
3 --> 10
2022-11-11 11:50:53 +01:00
Holger Vogt 16b95ecda2 Small correction to previous commit. 2022-10-17 20:32:44 +02:00
Holger Vogt 43517efb41 Add a limit of 0.999 to bipolar parameters mje, mjc, and mjs.
The bipolar model is restricted to values < 1.
Fixes bug 583
2022-10-17 20:32:34 +02:00
Holger Vogt f78a8b49a7 The derivative of pow shall use the new pow function as well,
when compat mode LT is selected.
2022-10-14 14:54:30 +02:00
Holger Vogt 540cda52ad If compatmode is lt, change the pow(x,y) and x**y functions:
If x < 0, output only if y is integer number, otherwise output 0
2022-10-12 12:26:12 +02:00
Holger Vogt d24b405bfb Add some comment 2022-10-12 12:23:36 +02:00
Holger Vogt cfba8a5cd3 Note: ix: dc value used for op instead of transient time=0 value
Former warning message or note only issued when dc value and
value at transient time=0 differ.
2022-09-20 22:50:17 +02:00
Holger Vogt bce48859df Note: vs: dc value used for op instead of transient time=0 value
Former warning message or note only issued when dc value and
value at transient time=0 differ.
2022-09-20 22:47:24 +02:00
Holger Vogt ff62468c1f Iterations for op or dc may start with arguments 0 for ln().
To cope with this, and potential overflow in exp function,
some limits have been added.
2022-08-30 20:02:46 +02:00
Holger Vogt 758ecd1d60 tabs to spaces 2022-07-18 23:29:59 +02:00
Holger Vogt 298eb556cd Make error message more verbose: Instead of only "no such parameter on this device",
give name of bad parameter and respective line in netlist.
2022-07-18 23:28:51 +02:00
Holger Vogt d57909eef1 Re-format cktdojob.c 2022-07-16 17:24:41 +02:00
Holger Vogt e3b13e0494 Consecutive tran and ac simulation may lead to gross errors
when TC or scale is used on the instance line of C and L.
Reason is the missing reset when CKTtemp is called once during each
simulation command. TC or scale is then applied again and again,
a reset is missing.

This patch adds a reset, i.e. the capacitance or inductance is
reset to its instance value in a call to *temp. It fixes bug#594.

Command 'alter' has been tested.

Resistance has not been tackled by this bug, because the line
here->RESconduct = here->RESm / (here->RESresist * factor * here->RESscale);
differs from
here->CAPcapac = here->CAPcapac * factor * here->CAPscale;
in that there is no accumulation of correction factors with here->RESconduct
2022-07-08 09:32:34 +02:00
Holger Vogt 8ff547c5da No error message when Optran returned 0 2022-06-30 20:03:58 +02:00
Holger Vogt c9a864933b re-format indmask.c 2022-06-26 11:43:18 +02:00
Holger Vogt 8023402db8 Add missing parameter retrival 2022-06-26 11:40:10 +02:00
Holger Vogt a2d7c342dd Asl Lundin's correction only when suitable modelparameters are given. 2022-06-26 11:39:43 +02:00
Holger Vogt 7d2ea36fdf Add a warning when Lundin's correction factor is not
calculated because the geometries are too small (< 1um).
2022-06-22 15:31:17 +02:00
Holger Vogt 8d2a6c2405 Add coil diameter dia to the inductor parameters.
dia (diameter) takes preference over csect (cross section)
2022-06-22 13:26:57 +02:00
Holger Vogt 10d4b34ec5 Add Lundin's geometry correction to the
inductance formula
2022-06-22 12:59:37 +02:00
Holger Vogt 5f0035ca91 Fix a bug in the inductance formula. 2022-06-20 14:22:55 +02:00
Holger Vogt 89fcc20570 Make error message more verbose:
State explicitely when transient op has failed.
2022-06-18 17:05:05 +02:00
Giles Atkinson 935ed58ce6 Fix bugs found while investigating Bug #585 (convergence failure only
on Linux).  In dctran.c make it impossible for a transient simulation
to run far past its end time and fix an infinite loop attempting to remove
the automatically-inserted ending breakpoint.  In outitf.c fix memory
corruption if the simulation does over-run (change suggested by Holger Vogt).
2022-06-08 16:33:43 +02:00
Holger Vogt 519cb8392c dc sweep fails after transient sim:
keep MODEDCTRANCURVE as provided by commit
7d8236766 ("b3ld.c, b4ld.c, b3v32ld.c: enable capacitance calculation during dc sweep", 2012-10-03)
Instead exclude current integration when MODEDCTRANCURVE is selected.
Unify setting ChargeComputationNeeded in b4vdld.c,
make it as in other b4xxld.c.
2022-06-06 16:27:06 +02:00
Holger Vogt 75a6392b43 VIN 3 0 PULSE (-1 1 2NS 2NS 2NS 50 NS 100 NS) is now standard
(missing dc value).
So revert the warning message:
VIN 3 0 dc 0 PULSE (-1 1 2NS 2NS 2NS 50 NS 100 NS) yields
a note message (not a warning)
2022-05-19 12:04:44 +02:00
Giles Atkinson 11d6c41a7d Fix memory leaks found by valgrind in the paranoia script. 2022-05-08 17:59:20 +02:00
dwarning 4a6f61ad5a more logical setup for absurd parameter input 2022-05-02 09:19:08 +02:00
dwarning d692669bb9 prevent crash for absurd parameter input 2022-05-01 17:55:56 +02:00