Index: 06_features/simulation/index.html
===================================================================
--- 06_features/simulation/index.html (nonexistent)
+++ 06_features/simulation/index.html (revision 8815)
@@ -0,0 +1,128 @@
+
+
+
+ Simulation
+
+In this context, simulation means circuit simulation using a lumped element
+model of the circuit generated from the abstract model. More practically,
+simulation means SPICE simulation.
+
+There are two levels of the implementation:
+
+ - low level, which requires more knowledgeon SPICE syntax, plus requires
+ the drawing to be decorated with SPICE-specific symbols
+
- high level, which is further away from teh SPICE syntax and is designed
+ to operate on drawings without having to add extra SPICE or simulation
+ specific symbols (sources, probes, commands, etc.)
+
+
+The high level simulation is recommended if:
+
+ - you are new to circuit simulation
+
- sheets drawn for a production workflow (e.g. PCB workflow) should be
+ simulated without having to add SPICE decoration and without having to
+ copy out the relevant part
+
- can run ngspice from sch-rnd so you do not need to use shell or to write
+ scripts for quick iterations; results are displayed within sch-rnd
+ (when used from GUI)
+
- works with both GUI (dialog boxes) and CLI (actions)
+
+
+The low level simulation is recommended if:
+
+ - you already have a lot of expereince with spice and the SPICE syntax
+
- you want maximum flexibility on the SPICE side (arbitary commands)
+
- you do not mind making your drawing simulation-specific
+
- sch-rnd does not run the simulator, merely exports the netlist; you
+ will need to run the simulator using the netlist (from a shell, maybe
+ using scripts, or a Makefile)
+
+
+The easiest way to learn both the low and the high level simulation is
+the tutorial
+
+
High level simulation
+
+The high level sim differs a lot from the classic "drawn for spice"
+schematics model. It really models how circuits are tested in real life:
+
+ - the drawing is for the real board, typically done for the PCB workflow
+
- multiple different "simulation setups" can be defined
+
- a setup includes test bench configuration, which describes which parts
+ of the circuit should be included in the simulation, so you do not need
+ to simulate the whole circuit and you do not need to copy out the
+ relevant part into a separate sheet for simulation
+
- a setup includes instructions for modifications for the test: adding
+ sources or resistors (e.g. load) or capacitors or inductances; removing
+ parts; disconnecting pins; changing attributes (e.g. value of
+ components);
+
- a setup includes outpout configuration that contains commands for
+ SPICE to run different analyses and also contains instructions to
+ sch-rnd on how to present the output of those runs.
+
+All this remembered in sim setup config so you don't need to modify your
+production board for sim testing.
+
+The configuration stored for high level simulation has the following logical
+structure:
+
+ - simulation setup #1 (TODO: links)
+
- test bench configuration; this allows running the
+ simulation on parts of the drawing instead of the whole drawing
+
- 0 or more text-specified modifications that are performed before the netlist export:
+
+ - add components (e.g. sources, load resistors/capacitors/inductors)
+
+ - device type
+
- device parameters (e.g. dc, ac, time-dependent-function components for sources, resistance/capacitance/inductance for discretes)
+
+ - remove components
+
- break existing connections
+
- change component attributes
+
- change global states (e.g. temperature)
+
+ - 0 or more output configurations
+
+ - analysis type
+
- presentation
+
+ - simulation setup #2
+
+
- simulation setup #3
+
+
- ...
+
+
+On the bottom of the dialog there are buttons for:
+
+ - selecting the simulation view to use, which also specifies the
+ simulator to use (only sim_ngspice is available at the moment);
+ this information is not part of the configuration saved
+
- activating the simulation; this means switching to a sheet of the
+ project the simulation is for, switching to the view
+ selected for the simulation, enabling the test bench configured
+ and triggering a compilation to get it all displayed. CLI
+ alternative: SimActivate() action.
+
- running the simulation; this activates the simulation, compiles
+ immediately, executes the simulator in the background and
+ presents the results in the 3rd tab. CLI alternative: SimRun()
+ action.
+
+
+The GUI variant with the run button is designed to be suitable for quick
+turnaround circuit tuning: single-click button that can re-generate all
+the plots in-place in the non-modal simulation setup dialog; this means
+you can keep the window open, make changes to your production circuit
+and run the simulation instantly to see the result.
+
+
+
+
+
Low level simulation
+
+TODO