Holger Vogt
7970bc7c54
New tables for MOS devices
2022-07-24 15:55:46 +02:00
Holger Vogt
9302f14bb9
Return data to input directory.
2022-07-24 15:54:58 +02:00
Holger Vogt
0b3383546c
Handle .if ... .else ... .endif before .csparam is executed,
...
thus allowing parameter entry to .control section being dependent
on .if
2022-07-24 15:54:29 +02:00
Holger Vogt
09e48350eb
Simplify the NMOS or PMOS selection by setting only one parameter
...
'mostype'
ngspice-37+ is required.
2022-07-24 15:51:59 +02:00
Giles Atkinson
f878878bd8
Remove some dead code in the dec_bridge code model.
2022-07-24 12:23:24 +02:00
Giles Atkinson
659b426cf8
Fix double free in XSPICE CALLBACK functions as desribed here:
...
https://sourceforge.net/p/ngspice/mailman/message/37677362/
and add missing CALLBACKs in models that use STATIC_VARs with
pointer values.
2022-07-24 12:23:19 +02:00
Giles Atkinson
2406846a21
Extend the output and partial derivatives of the output from the 2/3-D
...
table lookup models (XSPICE) continuously outside the defined
rectangle or cube, as it may help convergence and avoid ambiguity caused
by rounding at the boundaries. See bug #591 "Wrong 2D table model output".
The value is that of the nearest point in the region while the reported
derivative is ramped to zero outside the boundaries.
Also fixes incorrect output at the upper limit in each dimension.
2022-07-24 12:23:15 +02:00
Giles Atkinson
ec725c3814
Fix memory leak by moving the state transition table to a STATIC_VAR
...
whose memory can be recovered by a call back. Also make cfunc.mod
less ugly.
2022-07-24 12:23:05 +02:00
Holger Vogt
44930ebcb1
Function guess_type may yield the wrong type, because
...
it does not cover all of the the many, many options possible.
This commit fixes bug597, where [current] was interpreted as
capacitance.
2022-07-24 12:17:29 +02:00
Holger Vogt
eee07be10d
Improve (a little) the plotting of digital data with plot option digiplot:
...
Repair scaling on MS Windows:
Suppress y axis lettering and unit:
Allow or dis-allow grid.
2022-07-20 15:11:51 +02:00
Holger Vogt
67fc36c8bb
We are devloping towrds ngspice-38
2022-07-20 14:52:25 +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
d61682360e
Prevent crash when ca or d are not defined. May happen when
...
.endc is missing.
2022-07-18 23:23:55 +02:00
Holger Vogt
b04e3dd89f
WinGUI: Add a button 'Stop' to stop a simulation in intercative
...
or control mode. ngspice enters interactive mode and waits for user
commands. Simulation result vectors are available up to the
(time) point of stopping. Simulation may continue by command
'resume', however now in interactive mode, a control flow stays
interrupted.
2022-07-16 17:27:38 +02:00
Holger Vogt
ae89414661
Add udevices.c to project
2022-07-16 17:25:07 +02:00
Holger Vogt
d57909eef1
Re-format cktdojob.c
2022-07-16 17:24:41 +02:00
Holger Vogt
6ee4db9af4
Correct comment: Command circbyline is not involved,
...
we are sending the netlist as an array.
2022-07-16 17:23:59 +02:00
Holger Vogt
8d91f44026
Suppress I/O redirection for command 'circbyline'.
...
This enables sending commands like
circbyline btest testnode 0 v=((v(in1) - v(in2)) < 0.1 ? 0.111 : v(in1))
2022-07-16 17:23:11 +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
72cfc681e5
Move evaluation of statistical functions inside of a B source
...
to after numparam expansion, thus allow parameters in functions agauss etc.
Replace gettok by new gettok_np to ignore characters ( ) ,
which may be left over after parameter expansion.
This fixes bug 593.
2022-07-06 18:54:34 +02:00
Holger Vogt
905b1eae8c
Remove inner couple {...} from {{...}} only when instance is not
...
a behavioral source which will be translated to a B source.
2022-07-06 18:46:47 +02:00
Holger Vogt
86dedbd1f5
Add a new function char* gettok_np(char** s)
...
which finds a token, while scanning over (), like
they were white spaces. It also proceeds with s while
still finding (), (which gettok_noparens does not do).
2022-07-06 18:43:48 +02:00
Holger Vogt
975ea03308
Add configure flag --enable-shortcheck to enable a shortened make check
...
Only BSIM3 and BSIM4 are tested, when selected.
2022-07-05 09:59:51 +02:00
Holger Vogt
474a1e47b8
Avoid jump in phase when crossing 90° boundaries.
...
Code similar to cx_cph in cmath1.c
2022-07-03 11:28:00 +02:00
Holger Vogt
b629aad60c
enable compiling with VS 2019
2022-07-01 15:56:31 +02:00
Brian Taylor
ec6938ed70
There needs to be 2 variants of d0_gff. One for d_dlatch, the other for d_srlatch.
2022-07-01 15:55:26 +02:00
Brian Taylor
6418fe75b7
Clean out dead code in model processing.
2022-07-01 15:55:15 +02:00
Brian Taylor
4c2152c74f
Add support for srff.
2022-07-01 15:55:06 +02:00
Brian Taylor
b64f684a62
Remove debug code.
2022-07-01 15:55:00 +02:00
Brian Taylor
4d9f834f5e
Remove invalid check.
2022-07-01 15:54:45 +02:00
Brian Taylor
ca26dc2585
Add optional debug code to check for name collisions. Connector nodes between gates now have a con_ prefix.
2022-07-01 15:54:35 +02:00
Brian Taylor
933b13d544
Prevent multiple d_zero_inv99 models per subckt.
2022-07-01 15:54:27 +02:00
Brian Taylor
5f9146b40a
Follow convention, use eq() macro. Show replacement cards when ngdebug=TRUE.
2022-07-01 15:54:18 +02:00
Brian Taylor
a7b6cb9af7
Create pin and port lists only when variable ps_pins_and_ports is set != 0.
2022-07-01 15:54:08 +02:00
Brian Taylor
01e988d604
Remove optional:, params:, text: before generating a ports list.
2022-07-01 15:53:56 +02:00
Brian Taylor
9b390c1ca9
Retain the param: section after removing the optional: section from a Pspice subckt declaration.
2022-07-01 15:53:47 +02:00
Brian Taylor
69ef28de4a
Add more comments. Move incompatible input name checks to add_..._inout_timing_model() functions for dff, jkff, dltch.
2022-07-01 15:53:19 +02:00
Brian Taylor
831f8b1dad
This test is equivalent to examples/xspice/xspice_c3.cir and uses Pspice subckts for the divider and nand gate.
2022-07-01 15:53:10 +02:00
Brian Taylor
3ca14e44ed
Add counter test. Check for usage of $d_lo, $d_hi, $d_nc usage with dff, jkff, dltch which will not translate to Xspice.
2022-07-01 15:53:02 +02:00
Brian Taylor
45c88edb77
All-digital U* device examples. No a/d or d/a interfaces on the subcircuits.
2022-07-01 15:52:52 +02:00
Brian Taylor
ff3a704710
Get rid of -Wpedantic warnings.
2022-07-01 15:52:39 +02:00
Brian Taylor
79625f10f5
Remove debugging asserts.
2022-07-01 15:52:14 +02:00
Brian Taylor
55a5c0cb0a
Generate lists of subckt ports indicating direction (in, out, inout.)
2022-07-01 15:52:01 +02:00
Brian Taylor
d41bff8373
Stopped memory leak in continuation cards when removing old cards.
2022-07-01 15:51:53 +02:00
Brian Taylor
fff87ebb81
Slight cleanup. Some work ensuring that generated names do not collide may be necessary.
2022-07-01 15:51:37 +02:00
Brian Taylor
93d067775f
For debug tracing, list the cards before and after udevice replacements.
2022-07-01 15:51:24 +02:00
Brian Taylor
de2dc6f1d5
Add pullup/down. Skip spurious '*' line.
2022-07-01 15:51:12 +02:00
Brian Taylor
0513fb5c8f
Add support for oa/oai compound gates.
2022-07-01 15:50:46 +02:00
Brian Taylor
63cec9668c
Fix a memory leak. Cleanup the code a bit. All-digital Pspice subckts with U* devices for most used gates/ff can be handled. More extensive test cases are necessary. Also, interfacing subckts with analog ports is not implemented.
2022-07-01 15:50:34 +02:00