From 541ced0fdfc06ba03280e5da9cd8b53ed1047177 Mon Sep 17 00:00:00 2001
From: Stefan Frederik
The best way to quickly set up a simulation with Xschem is to look at some of the provided examples.
If you descend into the test_inv component you see a working circuit ready for simulation.
-
@@ -72,7 +75,7 @@ xschem
You can descend into the example circuits on the left by clicking the symbols (they will turn to grey
meaning they are selected) and press the e key or by menu Edit->Push schematic.
You can return to the parent level by pressing Ctrl-e or by menu Edit->Pop.
- 
+ 
You can disable the welcome page by commenting the following line in the xschemrc file:
set XSCHEM_START_WINDOW {sky130_tests/top.sch}
@@ -101,7 +104,7 @@ set XSCHEM_START_WINDOW {sky130_tests/top.sch}

+ 
One line is needed in the spice netlist to load the spice models:
@@ -117,12 +120,12 @@ set XSCHEM_START_WINDOW {sky130_tests/top.sch}
giving simulator commands and options.
You place this component by pressing the Insert or i key, browsing into the standard xschem
devices directory and placing code_shown.sym or code.sym into the schematic.
- 
+ 
Once placed in the schematic, you may click the component, press q to edit its attributes, set the
Edit attr. listbox on the right to value and enter the simulator commands to run the simulation.
You can give a reference name to this component by setting the Edit attr. listbox to name and give it
a name that will be diplayed in the schematic. (COMMANDS2 in the example).
- 
+ 
Note in above commands a write test_inv_ngspice.raw command. This example runs simulation with both
@@ -133,7 +136,7 @@ set XSCHEM_START_WINDOW {sky130_tests/top.sch}
If you select the TT_MODELS component and press q you see the reference to the PDK top library SPICE file.
The path is specified using TCL variables that have been generated by xschem when the pdk installation was looked up.
This allows to have portable schematics, no absolute path is hardcoded in the schematic files.
- 
+ 
If everything is set up correctly pressing the Netlist button or hitting the n key will produce
a spice netlist of the circuit. The netlist location is by default set to your home directory:
~/.xschem/simulations
@@ -146,9 +149,9 @@ schippes@mazinga:~/x/test_open_pdks$ ls -ltr ~/.xschem/simulations/
You can then simulate the circuit. Select the simulator to use by clicking menu
Simulation->Configure simulators and tools and selecting (for this example) ngspice
- 
+ 
Press the Simulation button and see the ngspice running in a terminal:
- 
+ 
The default terminal used by xschem to run the simulator is xterm. I strongly suggest you to install xterm
@@ -165,9 +168,9 @@ schippes@mazinga:~/x/test_open_pdks$ ls -ltr ~/.xschem/simulations/
and a waveform reload launcher (Simulation->Add waveform reload launcher).
The launcher has a tclcommand attribute that loads the simulator data file (test_inv.raw) and
specifies the type of analysis (op, dc, ac, tran)
- 
+ 
See the manual for details
- 
+ 