Giles Atkinson
d31568bd83
Add parsing and translation of the FREQ form of E-source devices,
integrated with the existing parsing of AND/NAND/OR/NOR forms (inpcom.c).
For the implementation, add a new analog XSPICE code model, xfer.
Add an example to examples/sp.
3 years ago
Giles Atkinson
eeb912228a
When creating a plot vector from XSPICE event history, add a
final point at the end of the vector, so that a plotted line
does not end at the last event, leaving an odd spike.
3 years ago
Giles Atkinson
9099a922fd
Apply a patch from Aleksey Morozov to fix a bug that he identified
and reproduced. It is the same as Bug #331 -
"XSpice skips digital output point" except that it applies to the
instance queue, not the event queue.
3 years ago
Holger Vogt
678a6582f6
A preliminary fix to reduce the amount of missing pulses considerably.
Probably not yet the final solution.
3 years ago
Giles Atkinson
5aa48cab0b
Do not generate netlist lines that use non-existent libraries.
To support that, give global scope to function inp_pathresolve()
in inpcom.c. Update internal documentation (long comment).
3 years ago
Holger Vogt
062785319a
When '.probe alli' is set, disable auto bridging and set a flag
3 years ago
Giles Atkinson
5197200fb3
Fix crash reported by Brian Taylor. If "source" is used after
analysis, the circuit is both deleted and destroyed. Beware of
double frees.
3 years ago
Giles Atkinson
98333ee89a
Fix a memory leak reported by Brian Taylor that was introduced
by commit 4d8e17487b .
3 years ago
Giles Atkinson
e25f8bd522
Add inertial delay to missed d_xnor and tidy blank lines in d_xor.
3 years ago
Giles Atkinson
cecce5163e
Inertial delay for remaining simple gates and buffers:
nand or xor open_c open_e, but not tristate.
3 years ago
Giles Atkinson
db38d4ad54
Correct timing of transitions to UNKNOWN.
3 years ago
Giles Atkinson
4623a04615
Interim version of inertial delay for tristate buffer.
This does not handle three-way or mixed transitions.
3 years ago
Giles Atkinson
e3b4df6a51
First group of digital code models with improved implementation
of inertial delay: buffer, inverter, and, nor. Also adds
utility function cm_is_inertial(().
3 years ago
Giles Atkinson
2643e3b17f
New code-model library functions cm_schedule_output() and cm_getvar().
To be used in the inertial delay code for digital code models.
3 years ago
Giles Atkinson
c1659a64c3
Change output event setup in evtload.c so that, when making an event call
to a code model, there is no longer a reference to the value of the event
at the head of the free list. That allows all such free lists (with the
same data type) to be combined, probably improving performance.
This is in preparation for full implementation of inertial delay for
digital nodes.
3 years ago
Giles Atkinson
2d0561f386
Allow string-valued parameters to XSPICE device models with no default.
The code model then sees the value NULL. Needed for the "family"
parameter on logic models, used by automatic bridge insertion.
3 years ago
Giles Atkinson
06aa693852
A new fix for Bug #331 : "XSpice skips digital output point".
The problem was caused by removing an output queue from the "modified"
list when it had been modified by processing one of its events.
3 years ago
Giles Atkinson
7457a2684b
Revert "Fixes bug #331"
This reverts commit 6d9876229c , because
it was found to break examples/xspice/various/xspice_c3.cir
(see discussion in bug report for February 2023) and an alternative
fix is available.
3 years ago
Holger Vogt
5924ae2dfb
bug report 619 by Hanspeter Niederstrasser
remove double inclusion of stdlib.h
Correction of commit 9e432838c ("Patch by Robert Turnbull: remove warning messages", 2023-02-05)
3 years ago
Holger Vogt
3ff9643f49
Add a scale factor 'a' (atto, 1e-18)
3 years ago
holger
f9ed3fd080
Patch by Robert Turnbull: remove warning messages
3 years ago
Giles Atkinson
7ead974a5a
Prevent crash when cm_analog_set_temp_bkpt() is called during OPtran().
3 years ago
Giles Atkinson
73e8fed0fc
Fix warnings from gcc 10.2.1.
3 years ago
Holger Vogt
ba6ff75dab
Trim trailing spaces
3 years ago
Holger Vogt
f26c9146f5
Don't allocate memory for control array at every time step
Use loc instead, setting it up once during INIT
3 years ago
Holger Vogt
e47049f31a
Add STATIC_VAR_TABLE locdata
Add CALLBACK cm_d_pwm_callback
Reserve memory for x, y arrays only once during INIT
3 years ago
Holger Vogt
ed6f802948
Add a guard on parameter 'position', limit to
1e-9 to 0.999999999
FIXME: the given parameter limits from ifspec.ifs are not recognized.
4 years ago
Holger Vogt
2d8ea17d65
Update on author
4 years ago
Holger Vogt
61d23b99ff
Patch required to allow compiling at Fedora with -Werror=format-security
Provided by Mamoru Tasaka
4 years ago
Giles Atkinson
01c4a5dff2
Fix memory leak reported by Brian Taylor.
4 years ago
Holger Vogt
9166f202a6
Streamline the simple diode model.
4 years ago
Holger Vogt
ec6a902fb9
Fix a bug in simple diode, when ilimit is set, but not epsilon.
Make model more similar to LTSPICE
Add an example
4 years ago
Giles Atkinson
d9952575dd
Correct the digital state resolution table, that was previously asymmetric.
An equivalent change is mentioned in the SPICE OPUS change history.
4 years ago
Giles Atkinson
372d9b2c87
Add bidirectional digital/analog bridge.
4 years ago
Giles Atkinson
e80b724460
Add two functions to the Code Model Library: cm_get_node_name()
makes circuit node names available to diagnostics, while
cm_probe_node() is needed for a bidirectional A/D bridge.
4 years ago
Giles Atkinson
06131d8107
Rewrite code with Visual Studio complaints.
4 years ago
Holger Vogt
519ce44227
safeguard against circuit not being abvailable,
avoid crash
4 years ago
Holger Vogt
1d026475a2
pwlts: a pwl v/i source with time input, smoothing and limiting functions
4 years ago
Holger Vogt
0af4932c6f
Prevent a crash if (due to input error) the node_table is not available.
4 years ago
Holger Vogt
2126230b64
Prevent crashes when nodes or tables are not available,
e.g. due to missing input file.
4 years ago
Giles Atkinson
a0357b3432
Remove search for "family" parameters on subcircuits in XSPICE
automatic bridging support as string-valued parameter support is
not yet intgrated.
4 years ago
Giles Atkinson
4115064fd5
Latest auto-bridge code from development branch.
4 years ago
Giles Atkinson
b1341c8e30
Insert XSPICE bridging devices automatically when an analogue node
has the same name as an XSPICE event node (including digital nodes).
The function Evtcheck_nodes() is replaced by a new version in its
own file.
4 years ago
Holger Vogt
c8ed9590b7
Handle the case when control voltages on and off are equal.
Update the linear switch: add the limits to resistance ron, roff
Update the log switch: correct the resistance calculation for
von < voff
Add some examples for the pswitch.
4 years ago
Giles Atkinson
8038021369
Remove some dead code in the dec_bridge code model.
4 years ago
Giles Atkinson
88d5e723ed
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.
4 years ago
Giles Atkinson
10d3e1b754
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.
4 years ago
Giles Atkinson
8ef2d8dec8
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.
4 years ago
Giles Atkinson
dbf4c16bc0
Fix XSPICE memory leaks found by valgrind.
4 years ago
Holger Vogt
246f9f5e9e
d_pwm: Add a hybrid oscillator (analg control in, digital out) with PWM
(pulse width modulation) capability, oscillation frequency is a parameter.
The model has been derived from the d_osc example.
4 years ago