-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathprogressbar_demo.cir
More file actions
29 lines (28 loc) · 1013 Bytes
/
Copy pathprogressbar_demo.cir
File metadata and controls
29 lines (28 loc) · 1013 Bytes
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
28
29
Sweep progress-bar demo (Enhancement)
* -------------------------------------------------------------------------
* Run this interactively (or in batch) and watch the "Reference value"
* status line during the analysis:
*
* ngspice progressbar_demo.cir
*
* Instead of just the current sweep value, ngspice now appends a live
* progress bar and percentage, redrawn in place every 0.25 s:
*
* Reference value : 5.91926e-04 [================== ] 74%
*
* The fraction is exact per analysis: transient uses elapsed time / TSTOP,
* AC / noise use the frequency's position in the (log) band, DC uses the
* swept-source position. This deck runs a long-ish nonlinear transient so the
* bar is visible; change the analysis line to .ac / .dc / .noise to see the
* same bar there.
* -------------------------------------------------------------------------
.model DM D(is=1e-14 n=1)
V1 in 0 SIN(0 2 2k)
D1 in out DM
R1 out 0 1k
C1 out 0 10n
.control
tran 2n 2m
echo "done -- final V(out) = $&out"
.endc
.end