Analog (Integrated) Circuit Design
ac dec|lin points fstart fstop performs a small-signal ac analysis with either linear or decade sweepdc sourcename vstart vstop vincr [src2 start2 stop2 incr2] runs a dc-sweep, optionally across two variablesdisplay shows the available data vectors in the current plotecho can be used to display text, $variable or $&vector, can be useful for debugginglet name = expr to create a new vector; unlet vector deletes a specified vector; access vector data with $&veclinearize vec linearizes a vector on an equidistant time scale, do this before an FFT; with set specwindow=windowtype a proper windowing function can be setmeas can be used for various evaluations of measurement results (see ngspice manual for details)noise v(output <ref>) src (dec|lin) pts fstart fstop runs a small-signal noise analysisop calculates the operating point, useful for checking bias points and device parametersplot expr vs scale to plot somethingprint expr to print it, use print all to print everythingremzerovec can be useful to remove vectors with zero length, which otherwise cause issues when saving or plotting datarusage plot information about resource usage like memorysave all or save signal specifies which data is saved during simulation; this lowers RAM usage during simulation and size of RAW file; do save before the actual simulation statementsetplot show a list of available plotsset var = value to set the value of a variable; use variable with $var; unset var removes a variableset enable_noisy_r to enable noise of behavioral resistors; usually, this is a good ideashell cmd to run a shell commandshow : param, like show : gm shows the \(g_\mathrm{m}\) of all devices after running an operating point with opspec plots a spectrum (i.e. frequency domain plot)status shows the saved parameters and nodestf runs a transfer function analysis, returning transfer function, input and output resistancetran tstep tstop <tstart <tmax>> runs a transient analysis until tstop, reporting results with tstep step size, starting to plot at tstart and performs time steps not larger then tmaxwrdata writes data into a file in a tabular ASCII format; easy to further processwrite writes simulation data (the saved nodes) into a RAW file; default is binary, can be changed to ASCII with set filetype=ascii; with set appendwrite data is added to an existing fileabstol sets the absolute current error tolerance (default is 1pA)gmin is the conductance applied at every node for convergence improvement (default is 1e-12); this can be critical for very high impedance circuitsklu sets the KLU matrix solverlist print the summary listing of the input datamaxord sets the numerical order of the integration method (default is 2 for Gear)method set the numerical integration method to gear or trap (default is trap)node prints the node tablenoinit suppresses printing of the initial transient solution (to quiet the output)nomod suppresses printing of the model table (to quiet the output)opts prints the option valuestemp sets the simulation temperaturereltol set the relative error tolerance (default is 0.001 = 0.1%)savecurrents saves the terminal currents of all devicessparse sets the sparse matrix solver, which can run noise analysis, but is slower than kluvntol sets the absolute voltage error tolerance (default is 1µV)warn enables the printing of the SOA warning messagesoption gmin can be used to increase the conductance applied at every nodeoption method=gear can lead to improved convergence.nodeset can be used to specify initial node voltage guesses.ic can be used to set initial conditionsxfont_sizeappendwrite=1curplotfiletype, either binary (default) or asciinum_threadssqrnoise=1 (otherwise V/rtHz or A/rtHz)