blob: a5bc2687c7b6bcd12a803c898d475716caf89020 (
plain)
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
|
Code Model Test - Transient: sine, triangle, aswitch, zener, oneshot
*
*
*** analysis type ***
.tran .01ms 2ms
*
*** input sources ***
*
v1 1 0 DC 0.0 PWL(0 0 2e-3 2)
*
v2 2 0 DC 0.0 PWL(0 0 2e-3 10)
*
v3 3 0 DC 0.0 PWL(0 0.0 0.9e-3 0.0 1e-3 1.0 1.9e-3 1.0 2e-3 0.0 2.9e-3 0.0)
*
v4 4 0 DC 1.0
*
*
*** sine block ***
a1 2 10 sine1
.model sine1 sine (cntl_array=[-1.0 0.0 10.0 20.0]
+ freq_array=[500 500 2000 2000]
+ out_low=-1.0 out_high=1.0)
*
*
*** triangle block ***
a2 1 20 triangle1
.model triangle1 triangle (cntl_array=[-1.0 0.0 10.0 20.0]
+ freq_array=[500 500 10000 10000]
+ out_low=-1.0 out_high=1.0 duty_cycle=0.5)
*
*
*** aswitch block ***
a3 1 (4 30) aswitch1
.model aswitch1 aswitch (cntl_off=0.0 cntl_on=1.0 log=TRUE
+ r_off=1.0e12 r_on=10.0)
*
*
*** zener diode ***
rzener 2 40 100
a4 (0 40) zener1
.model zener1 zener (v_breakdown=9.0 i_breakdown=2.0e-2
+ r_breakdown=1.0 i_rev=1.0e-6 i_sat=1.0e-12
+ n_forward=1.0 limit_switch=FALSE)
*
*
*** oneshot block ***
a5 3 1 0 50 oneshot1
.model oneshot1 oneshot (cntl_array=[-1.0 0.0 1.0 2.0]
+ pw_array=[2.0e-3 2.0e-3 0.1e-3 0.1e-3] clk_trig=0.5
+ pos_edge_trig=TRUE out_low=0.0 out_high=1.0
+ rise_time=1.0e-6 rise_delay=1.0e-9
+ fall_delay=1.0e-9 fall_time=1.0e-6
+ retrig=FALSE)
*
*
*** square block ***
a6 2 60 square1
.model square1 square (cntl_array=[-1.0 0.0 10.0 20.0]
+ freq_array=[500 500 7000 7000]
+ out_low=-0.8 out_high=1.2 duty_cycle=0.5
+ rise_time=1e-6 fall_time=2e-6)
*
*** resistors to ground ***
r1 1 0 10k
r2 2 0 10k
r3 3 0 10k
r4 4 0 10k
*
r10 10 0 10k
r20 20 0 10k
r30 30 0 10k
r40 40 0 10k
r50 50 0 10k
r60 60 0 10k
*
*
.end
|