Vernier simulation
Simulate the schematic
- Open the schematic.
- Open the Waveforms panel.
- Keep the SPICE deck box empty.
- Click Run in the Waveforms panel, or click Run simulation on the Schematic tab.
Vernier makes a SPICE deck from the schematic. It uses the first simulation setup of the project. If the project has no simulation setup, Vernier does an operating point analysis.
A part that the deck cannot have, for example a part with no SPICE model, is not in the deck. The Messages panel shows a warning for each such part.
To keep a symbol out of the simulation, select the symbol and set Exclude from simulation in the Properties panel. Vernier does not give a warning for that symbol.
To stop a simulation, click Cancel in the Waveforms panel, or click Cancel the job.
Set up the simulation
- On the Schematic tab, click Simulation setup.
- Type a Name.
- In Analyses, type one analysis on each line, for example:
.op.tran 10u 5m.ac dec 20 1 1meg.dc V1 0 5 0.1
- In Sources and directives, type the SPICE lines that the deck gets, for example
V1 in 0 PULSE(0 1 0 1n 1n 1 2)or a.paramline. - In Probes, type the vectors to plot, for example
V(out) I(R1). Keep it empty to plot all node voltages. - Click OK.
The node names are the net names in lower case, without the sheet path. For example, the net /OUT is the node out. The net GND is the node 0.
If no source drives a net of a part, the Messages panel gives a warning. Add the source, for example the supply of a connector, to Sources and directives.
Simulate a SPICE deck
- Open the Waveforms panel.
- Type or paste the SPICE deck in the deck box.
- Click Run.
Read the results
Select a result in the list above the plot.
| Result | Display |
|---|---|
| Operating point | A table of values |
| DC sweep | A plot. The X axis always goes from the smallest to the largest value. |
| AC (magnitude) | A plot of the magnitude. The two axes are logarithmic. |
| Transient | A plot |
- Move the pointer on the plot to read the values.
- Use Log X and Log Y to set logarithmic axes.
The X unit of a DC sweep is the unit of the swept item: V for a voltage source, A for a current source, Ohm for a resistor, and deg C for the temperature.
If the simulation gives no result, look in the Messages panel.
Supported SPICE
| Item | Support |
|---|---|
| Analyses | .op, .dc, .ac (dec, oct, lin, list), .tran |
| Other cards | .param, .model, .subckt and .ends, .global, .include, .lib, .options, .temp, .ic, .nodeset, .meas, .save, .probe, .title, .end |
| Cards that Vernier ignores, with a message | .print, .plot, .four, .width, .control blocks |
| Devices | R, L, C, K (coupling), V, I, E, F, G, H, B (behavioral), D, Q, M, J, S and W (switches), X (subcircuit) |
| Source functions | DC, AC, PULSE, SIN, EXP, PWL, SFFM |
| Devices that Vernier does not support | T, O, U, Y, Z, P, N, A. The simulation stops with an error. |
Limits:
.tempuses only the first temperature.- The Q (bipolar transistor) model is a subset of the Gummel-Poon model.
- The M (MOSFET) model is level 1. Other levels use the level 1 equations, with a warning.
- An unknown card is ignored, with a warning.
- Some seed library models are fitted to the typical values of a datasheet. They are approximations, not manufacturer models.
Simulate from the command line
vernier sim <file> [--analysis <card>]... [--setup <name>] [--probe <vector>]... [--temp <C>] [--out raw|csv] [-o <file>]
- The file can be a SPICE deck (
.cir,.sp,.spice,.net,.ckt), a schematic (.vsch) or a project (.vprj). - A deck has its own analysis cards.
--analysisand--setupare for a schematic or a project only. --analysisreplaces the analyses of the simulation setup, for example--analysis ".tran 1u 1m".--probekeeps only the given vectors in the result.- The output is raw text (the default) or CSV.
- The exit code is 1 when the simulation fails.
See Automation.