File: ex1a.cir

package info (click to toggle)
ngspice 30.2-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 50,684 kB
  • sloc: ansic: 497,340; xml: 6,914; makefile: 3,620; sh: 2,322; perl: 1,909; yacc: 1,514; tcl: 1,033; lex: 318
file content (29 lines) | stat: -rw-r--r-- 296 bytes parent folder | download
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
ex1a, check lib processing

I1     9 0  -1mA
X1     9 0  sub1

Vcheck 9 check0  1.0V

.lib 'ex1.lib' RES

.subckt  sub1  n1 n2
X2  n1 n2  sub_in_lib
R2  n1 n2  2k
.ends

.control
op

echo "Note: v(check0) = $&v(check0)"

if abs(v(check0)) > 1e-9
  quit 1
end

echo "INFO: ok"
quit 0

.endc

.end