File: ex2a.cir

package info (click to toggle)
ngspice 34%2Bds-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 56,764 kB
  • sloc: ansic: 505,343; cpp: 15,906; xml: 9,158; makefile: 3,676; sh: 2,315; perl: 2,287; yacc: 1,520; tcl: 1,033; lex: 318; pascal: 241; python: 143
file content (47 lines) | stat: -rw-r--r-- 585 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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
ex2a, check lib processing

I1    7 0  -1mA
X1    7 0  sub1_in_lib

Vcheck1  7 check1  1.0V

I2    9 0  -1mA
X2    9 0  sub2_in_lib

Vcheck2  9 check2  2.0V

.lib 'ex2.lib' MOS

.control
op

let n_pass = 0

echo "Note: v(check1) = $&v(check1)"
echo "Note: v(check2) = $&v(check2)"

if abs(v(check1)) <= 1e-9
    let n_pass = n_pass + 1
else
    echo "ERROR: Test 1 failed"
end


if abs(v(check2)) <= 1e-9
    let n_pass = n_pass + 1
else
    echo "ERROR: Test 2 failed"
end


if n_pass = 2
    echo "INFO: ok"
    quit 0
end

echo ERROR: $&n_pass of 2 tests passed
quit 1

.endc

.end