Global Options and Constants Tables

Options Variables

The following variables can be set from the netlist using the .options keyword. Available options are listed below:

Name Default Unit Description
abstol 1e-07 nodal unit Absolute tolerance for nodal variables
errfunc 0 bool Enable additional test for error function in Newton’s method
gyr 0.001 S Default gain in internal gyrators
maxdelta 20.0 nodal unit Maximum allowed change in one Newton iteration
maxiter 20   Maximum number of Newton iterations
reltol 0.0001   Relative tolerance for nodal variables
sparse 1 bool Use sparse matrices in analyses if possible
temp 27.0 C Ambient temperature

Global options can be accessed within an interactive shell in the program. For example:

cechrist@moon:~/$ cardoon -i

Cardoon Circuit Simulator 0.4 release
Type CTR-D to exit
In <1>: glVar.gyr
Out<1>: 0.001
In <2>: glVar.abstol
Out<2>: 1e-08
In <3>:

Convergence Notes

  • abstol and reltol control the absolute and relative tolerances in nodal variables. Iterations stop when updates in nodal variables are smaller than abstol + reltol * var.
  • If errfunc is set then an additional test is performed to check that the error in the nodal equation is less than abstol. This test is disabled by default because it introduces additional overhead. However it may be useful in cases where convergence is very slow.
  • The gyr variable is used to control the gain of internal gyrators in some device models. For example, a value of 1e-3 means that the extra nodal voltage in an ideal voltage source model is equal to the current through the source expressed in mA.
  • Sometimes Newton’s method convergence can be achieved by adjusting the value of maxdelta and increasing maxiter.

Physical and Mathematical Constants

Physical constants are used within models and they are also available from interactive shells:

In <4>: from globalVars import const
In <5>: const.epsilon0
Out<5>: 8.8541878170000005e-12

Table of physical and mathematical constants:

Name Default Unit Description
Np2dB 8.68588963807 dB/Np Neper to dB conversion constant
T0 273.15 K Zero degree Celsius temperature
c0 299792458.0 m s^{-1} Speed of light in free space
epOx 3.45e-11   Permitivity of silicon oxide
epSi 1.045e-10   Permitivity of silicon
epsilon0 8.854187817e-12 F m^{-1} Permittivity of free space
k 1.3806488e-23 J K^{-1} Boltzmann constant
mu0 1.25663706144e-06 H m^{-1} Permeability of free space
q 1.602176565e-19 C Elementary charge

Table Of Contents

Previous topic

Device Library Catalog

Next topic

Simulation Examples

This Page