Skip to main content
Built-in Elements

<analog.transientsimulation />

<analog.transientsimulation /> records voltages and currents over time. Import analog from "tscircuit" and place the element inside a board or group alongside sources and probes. Numeric time values are in milliseconds.

Schematic Circuit Preview
import { analog } from "tscircuit"

export default () => (
<board routingDisabled>
<voltagesource name="V1" voltage="5V" acMagnitude="1V" schX={-3} />
<resistor name="R1" resistance="1k" schY={2} />
<resistor name="R2" resistance="1k" schX={3} />
<trace from=".V1 > .pin1" to=".R1 > .pin1" />
<trace from=".R1 > .pin2" to=".R2 > .pin1" />
<trace from=".R2 > .pin2" to=".V1 > .pin2" />
<voltageprobe
name="VOUT"
connectsTo=".R2 > .pin1"
referenceTo=".V1 > .pin2"
/>
<analog.transientsimulation
name="Startup"
duration="10ms"
timePerStep="0.1ms"
spiceEngine="ngspice"
/>
</board>
)

Properties​

PropertyDescription
durationEnd time of the simulation, measured from zero. Defaults to "10ms". Must be positive.
startTimeTime at which recording begins. Defaults to "0ms"; must be between zero and duration.
timePerStepMaximum simulation timestep. Defaults to "0.01ms". Must be positive.
nameOptional experiment name. Use a unique name for each experiment.
spiceEngineEngine to run the analysis, such as "ngspice". Defaults to "spicey"; the selected engine must support the analysis.
spiceOptionsSolver options: method ("trap" or "gear"), reltol, abstol, and vntol.
graphIndependentAxesGive each probe channel an independent vertical scale.
childrenAn optional <analog.sweepparameter /> for repeated runs.
ibisPinStatesPhysical pin selectors mapped to { isOutput: false } or { isOutput: true, isOutputEnabled: boolean }. Requires spiceEngine="pcb_spice".
pcbSpiceChannelPCB channel extraction settings. Requires spiceEngine="pcb_spice"; see below.

A board-level experiment collects probes throughout the board. An experiment in a group collects probes in that group while simulating the complete circuit. See multiple simulations and group scope.

External PCB and IBIS simulations​

With spiceEngine="pcb_spice", IBIS experiments are declared for an external runner rather than executed during rendering. Bind the vendor IBIS model to the chip and explicitly set each modeled signal pin's state for this experiment. Use <analog.digitalstimulus /> to drive an enabled output and <analog.eyediagram /> to declare an eye measurement.

pcbSpiceChannel describes the physical channel to extract:

FieldDescription
reduction"routed-copper" or "straightened-stages".
sectionsInteger section count from 1 to 128.
lanesOne to three { name, from, to } entries selecting the lane endpoints.
referencePinRefPhysical reference pin selector.
extractionRequired positive minimumFrequency, maximumFrequency, modelFrequency, filaments, refinementFilaments, convergenceTolerance, capacitanceTolerance, reciprocityTolerance, dcResistanceTolerance, and maxPanelLength; optional groundMeshSize. Refinement filaments must exceed filaments.
passiveComponentRefsOptional selectors for passive components in the channel.
relativePermittivityOptional positive dielectric relative permittivity.
viaOptional platingThickness, equivalentWidth, and omitThroughViaStubs.
straightenedStageProfilesOptional profiles keyed by stage name, with spacing, relativePermittivity, and return geometry (width, thickness, lengthFactor, centerY, centerZ).

The existing <analogsimulation /> is also available for basic transient simulations. The namespaced component additionally supports nested parameter sweeps and the PCB/IBIS settings above.