File: ngspice.tcl

package info (click to toggle)
xcircuit 3.9.73%2Bdfsg.1-2
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 8,560 kB
  • sloc: ansic: 80,417; sh: 7,295; tcl: 5,891; python: 449; makefile: 300
file content (27 lines) | stat: -rw-r--r-- 532 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# ngspice.tcl
#
# This script creates the active loop for the background ngspice
# simulator, and creates buttons for various simulator controls.
#
# Labels wishing to access spice variables can use, e.g.:
# spice send "print TIME\[$STEP\]"

proc ngsim {} {
   if {![catch {spice break}]} {
      refresh;
      spice resume
      after 500 ngsim	;# update at 1/2 second intervals
   }
}

proc startspice {} {
   spice start
   spice run
   after 500 ngsim
}

proc stopspice {} {
   after cancel ngsim
   spice break;
   refresh;
}