File: nreader17b.cir

package info (click to toggle)
klayout 0.30.0-1
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 292,204 kB
  • sloc: cpp: 2,068,428; ruby: 47,823; xml: 26,924; python: 14,404; sh: 1,812; tcl: 212; perl: 170; makefile: 112; ansic: 42
file content (24 lines) | stat: -rw-r--r-- 489 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

* recursive expansion of parametrized subcircuits

.param w1 1.5 w2 {w1*2}
.param l1 0.15 l2 'l1+0.1'

Xsub1a a b c sub1 w=w1 l=l1
Xsub1b a b c sub1 w=w2 l=l2

.subckt sub1 n1 n2 n3 w l
  * declares w and l parameters instead of nodes:
  w = 1.0
  l = 1.0
  .param w1 = w
  .param l1 = l
  Xsub2a n1 n2 n3 sub2 w=w1 l=l1 m=1
  .param w2 "w+0.0" l2 l*(0.5+0.5)
  Xsub2b n1 n2 n3 sub2 w=w2 l=l2 m=2
.ends 

.subckt sub2 n1 n2 n3 w=0.0 l=0.0 m=0
  Mnmos n1 n2 n3 n1 nmos w=w l=l m=m
.ends