summaryrefslogtreecommitdiff
path: root/Windows/spice/examples/various/alterparam.sp
blob: 663f73a2f6ed8718b221e7e047e114645d2b42c2 (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
*test alterparam
.param vv = 1
.param rr = 'vv + 1'

R1 1 0 {rr + 1}
v1 1 0 1

.subckt subr in out rint1 = 6
  .param rint = 5
  .param rint2 = 8
  R0 in out 'rint'
  R1 in out 'rint1'
  R2 in out 'rint2'
.ends

Xr 2 0 subr rint = 7 rint1 = 9
v2 2 0 1

.control
op
print v1#branch v2#branch
echo
listing expand
alterparam vv = 2
reset
op
print v1#branch v2#branch
echo
listing expand
alterparam subr rint = 13
alterparam subr rint1 = 15
alterparam subr rint2 = 17
reset
op
print v1#branch v2#branch
echo
listing expand
.endc

.end