2 %%Title: examples/diffamp_test
3 %%Creator: Xcircuit v2.1
4 %%CreationDate: Thu Dec 14 21:21:31 2000
6 %%BoundingBox: 176 218 436 574
7 %%DocumentNeededResources: font Times-Roman font Helvetica font Symbol
11 % PostScript prolog for output from xcircuit
14 % Electrical circuit (and otherwise general) drawing program
16 % Written by Tim Edwards 8/5/93--11/20/00 (tim@bach.ece.jhu.edu)
17 % The Johns Hopkins University
19 %%BeginResource: procset XCIRCproc 2.1 4
20 % supporting definitions --- these are the primary xcircuit types.
23 /topmat matrix currentmatrix def
25 /fontslant { /slant exch def [1 0 slant 1 0 0]
26 exch findfont exch makefont dup length dict /ndict exch def
27 { 1 index /FID ne { ndict 3 1 roll put } { pop pop } ifelse } forall
28 ndict definefont pop} def
29 /ul { dup type /stringtype eq showflag 1 eq and { gsave
30 currentpoint topmat setmatrix 0 0 moveto 2 index stringwidth pop (_)
31 false charpath flattenpath pathbbox grestore exch pop 1 index
32 sub setlinewidth exch pop currentpoint 3 -1 roll add moveto 0
33 rlineto stroke moveto } if } def
34 /ol { dup type /stringtype eq showflag 1 eq and { gsave gsave
35 currentpoint topmat setmatrix 2 index stringwidth pop 3 index
36 true charpath flattenpath pathbbox grestore exch pop
37 exch pop topmat setmatrix (_) true charpath pathbbox grestore
38 exch pop 1 index sub setlinewidth exch pop currentpoint
39 exch 4 1 roll exch sub add moveto pop 0 rlineto stroke
41 /stW { gsave currentpoint newpath moveto true charpath flattenpath
42 pathbbox pop exch pop sub grestore } def
43 /CR { 0 /Bline Bline fscale0 neg add def Bline moveto } def
44 /Kn { 2 copy kY add /kY exch def kX add /kX exch def rmoveto } bind def
46 /qS { (aa) stW (a a) stW sub 4 div 0 Kn } def
49 /cf0 { /fscale exch def xfont findfont fscale scalefont setfont
50 /kX 0 def /kY 0 def} def
51 /cf { dup type /realtype eq {40 mul /fscale0 exch def } if /xfont exch def
53 /ss { 0.67 fscale mul cf0 0 fscale 0.5 mul neg Kn } def
54 /Ss { 0.67 fscale mul cf0 0 fscale 0.5 mul Kn } def
55 /ns { kX neg kY neg Kn fscale0 cf0 } def
56 /ctmk { counttomark dup 2 add -1 roll pop } bind def
57 /label { gsave translate 0 0 moveto rotate /just exch def just 16 and 0 gt
58 {0 1 dtransform gsave pagemat setmatrix idtransform exch grestore
59 1 0 dtransform gsave pagemat setmatrix idtransform exch grestore
60 dup 0 eq {pop mul 0 gt} {3 1 roll pop pop 0 lt} ifelse
61 {-1 /just just dup 3 and 1 ne {3 xor} if def} {1} ifelse exch 0 lt
62 {-1 /just just dup 12 and 4 ne {12 xor} if def} {1} ifelse scale }
63 if /showflag 0 def /fspc pspc def /Bline 0 def gsave dup 1 add copy
64 0 exch {exch dup type /stringtype eq {true charpath flattenpath}
65 {exec} ifelse } repeat pop pathbbox grestore 3 -1 roll pop 3 1 roll
66 just 1 and 0 gt {just 2 and 0 gt {exch pop neg fspc sub} {exch sub
67 0.5 mul neg} ifelse} {pop neg fspc add} ifelse exch Bline exch
68 just 4 and 0 gt {just 8 and 0 gt {exch pop neg fspc sub}
69 {add 0.5 mul neg} ifelse} {pop neg fspc add} ifelse
70 /showflag 1 def Kn currentpoint translate /Bline 0 def
71 {dup type /stringtype eq {show}{exec} ifelse} repeat grestore } def
72 /pinlabel { hlevel 0 eq { /pspc 20 def label /pspc 0 def }
73 { pop pop pop pop {pop} repeat } ifelse } def
74 /pinglobal { pinlabel } def
75 /infolabel { pinlabel } def
77 /scb { setrgbcolor } bind def /sce { defColor aload pop scb } bind def
78 /cRedef {/defColor currentcolor 3 array astore def} def
79 /begingate { /hlevel hlevel 1 add def /defColor currentcolor sce 3 array
80 astore def gsave sce translate 0 0 moveto dup 0 lt
81 {neg 1 sub -1 1 scale} if rotate dup scale } bind def
82 /makeparm {3 string cvs dup length 1 add string /tstr exch def tstr exch
83 1 exch putinterval tstr 0 (v) putinterval tstr cvn} bind def
84 /beginparm { -1 1 {makeparm exch def} for
85 dup type /arraytype eq { aload length -1 1 {makeparm exch def}
86 for } if begingate } bind def
87 /endgate { /hlevel hlevel 1 sub def grestore defColor aload pop cRedef
91 /tmpa [1 0 0 1 0 0] def
92 /gar {8 8 true tmpa {<c0 c0 00 00 0c 0c 00 00>} imagemask} bind
93 {8 8 true tmpa {<30 70 60 02 03 07 06 20>} imagemask} bind
94 {8 8 true tmpa {<0c 1e 1e 0c c0 e1 e1 c0>} imagemask} bind
95 {8 8 true tmpa {<0f 0f 0f 0f f0 f0 f0 f0>} imagemask} bind
96 {8 8 true tmpa {<3f f3 e1 e1 f3 3f 1e 1e>} imagemask} bind
97 {8 8 true tmpa {<df cf 8f 9f fd fc f8 f9>} imagemask} bind
98 {8 8 true tmpa {<ff 3f 3f ff ff f3 f3 ff>} imagemask} bind 7 array astore def
99 /ppaint { gsave clip tmpa dup setmatrix pathbbox neg exch neg 4 2 roll
100 neg 4 -1 roll 2 copy gt {exch} if 8 div ceiling 8 mul 4 2 roll neg 2 copy
101 gt {exch} if 8 div ceiling 8 mul 3 -1 roll -8 5 -1 roll
102 { 3 index exch 5 exch put dup -8 3 index { 3 index
103 exch 4 exch put 3 index exec } for } for pop pop pop pop grestore } bind def
105 currentlinewidth mul setlinewidth /style exch def
106 style 1 and 0 gt not {closepath} if
107 style 2 and 0 gt {currentlinewidth 4 mul dup 2 array astore 0 setdash} if
108 style 4 and 0 gt {0.5 currentlinewidth 4 mul 2 array astore 0 setdash} if
109 style dup 256 ge exch 480 lt and { gsave 1 setgray eofill grestore } if
110 style 16 and 0 gt { gsave style 224 and -5 bitshift dup 7 lt
111 {gar exch get ppaint} { pop eofill } ifelse grestore } if
112 style 8 and 0 gt style 512 eq or { newpath } { stroke } ifelse grestore } def
114 /polygon { gsave /num exch def moveto num 1 sub {lineto} repeat setstyles } def
115 /xcarc { gsave newpath arc setstyles } def
116 /elb { matrix currentmatrix 7 -1 roll 7 -1 roll translate 5 1 roll 4 -1 roll
117 3 index div 1 scale } def
118 /ele { 0 4 1 roll 0 4 1 roll } bind def
119 /ellipse { gsave elb newpath ele arc setmatrix setstyles } def
120 /pellip { elb ele arc setmatrix } def
121 /nellip { elb ele arcn setmatrix } def
122 /spline { gsave moveto curveto setstyles } def
123 /polyc { {lineto} repeat } bind def
124 /beginpath { gsave moveto } bind def
125 /endpath { setstyles } bind def
126 /bop { 1 setlinecap 0 setlinejoin 6 setmiterlimit 0 0 0 scb cRedef } def
127 /insertion {/PSobj save def /showpage {} def bop translate} def
128 /end_insert {PSobj restore} def
129 /setpagemat {/pagemat matrix currentmatrix def} def
130 /inchscale {setpagemat 0.375 mul dup scale} def
131 /cmscale {setpagemat 0.35433071 mul dup scale} def
136 % XCircuit output starts here.
139 % -224 32 192 224 bbox
140 % ampl_test is_schematic
142 1.000 0.000 0.000 scb
143 (Vinn) {/Helvetica 1.000 cf} 2 23 0 -224 192 pinlabel
144 (Vinp) {/Helvetica 1.000 cf} 2 23 0 -224 96 pinlabel
145 (Voutn) {/Helvetica 1.000 cf} 2 20 0 -32 96 pinlabel
146 (Voutp) {/Helvetica 1.000 cf} 2 20 0 -32 192 pinlabel
147 (Vcmref) {/Helvetica 1.000 cf} 2 25 0 -160 256 pinlabel
148 (Vbias) {/Helvetica 1.000 cf} 2 29 0 -160 32 pinlabel
150 1 1.00 -224 96 -192 96 2 polygon
151 1 1.00 -224 192 -192 192 2 polygon
152 1 1.00 -128 192 -32 192 2 polygon
153 1 1.00 -128 96 -32 96 2 polygon
154 (-) {/Symbol 1.000 cf} 2 5 0 -141 106 label
155 (+) {/Symbol 1.000 cf} 2 5 0 -141 186 label
156 1 1.00 -32 144 -192 224 -192 64 -32 144 4 polygon
157 (-) {/Symbol 1.000 cf} 2 5 0 -173 186 label
158 (+) {/Symbol 1.000 cf} 2 5 0 -173 106 label
159 1 1.00 -160 80 -160 32 2 polygon
160 1 1.00 -160 208 -160 256 2 polygon
168 1 1.00 0 0 0 -32 2 polygon
169 1 1.00 -32 -32 32 -32 2 polygon
170 1 1.00 -18 -46 18 -46 2 polygon
171 1 1.00 -4 -60 4 -60 2 polygon
172 1.000 0.000 0.000 scb
173 (GND) {/Times-Roman 1.000 cf} 2 1 0 0 0 pinglobal
178 % -32 -64 64 128 bbox
181 1 1.00 0 0 32 0.00 360.00 xcarc
182 1 1.00 0 32 0 64 2 polygon
183 1 1.00 0 -32 0 -64 2 polygon
188 % -32 -64 139 128 bbox
191 (+) {/Symbol 1.000 cf} 2 5 0 0 18 label
192 (-) {/Symbol 1.000 cf} 2 5 0 0 -18 label
193 1.000 0.000 0.000 scb
194 (v.p) {/Times-Roman 1.000 cf} 2 9 0 0 64 pinlabel
195 (v.m) {/Times-Roman 1.000 cf} 2 13 0 0 -64 pinlabel
197 mark v1 (spice:V%i %pv.p %pv.m ) {/Times-Roman 1.000 cf} ctmk 20 0 -96 -160 infolabel
198 mark (V) {hS} v1 {/Times-Roman 1.000 cf} ctmk 20 0 48 0 label
206 248 1.00 0 0 6 0.00 360.00 xcarc
207 1.000 0.000 0.000 scb
208 (x) {/Times-Roman 1.000 cf} 2 29 0 0 0 pinlabel
216 1 1.00 0 0 10 -90.00 90.00 xcarc
217 1 1.00 0 10 0 16 2 polygon
218 1 1.00 0 -10 0 -16 2 polygon
219 1.000 0.000 0.000 scb
220 (a) {/Times-Roman 1.000 cf} 2 1 0 0 16 pinlabel
221 (a) {/Times-Roman 1.000 cf} 2 13 0 0 -16 pinlabel
229 1 1.00 16 0 6 0.00 360.00 xcarc
230 1 1.00 0 0 10 0 2 polygon
231 1.000 0.000 0.000 scb
232 (out) {/Times-Roman 1.000 cf} 2 4 0 16 0 pinlabel
233 (out) {/Times-Roman 1.000 cf} 2 7 0 0 0 pinlabel
237 %%Page: diffamp_test:1 1
238 %%PageOrientation: Landscape
241 90 rotate 42 -654 translate
245 1.00 0 1024 832 ampl_test
247 1.00 0 864 800 [(1) ] Vsource
248 1.00 0 1056 800 [(2.5) ] Vsource
249 1 1.00 1056 864 1056 1088 864 1088 3 polygon
251 1 1.00 800 928 752 928 752 864 848 864 4 polygon
252 1 1.00 880 864 1056 864 2 polygon
254 1.00 90 864 864 jumper
255 1 1.00 800 1024 720 1024 2 polygon
256 1.00 -1 720 1024 circle
257 1 1.00 992 928 1040 928 2 polygon
258 1 1.00 992 1024 1040 1024 2 polygon
259 1.00 90 1056 1024 jumper
260 1.00 90 1056 928 jumper
261 1 1.00 1072 1024 1136 1024 2 polygon
262 1 1.00 1072 928 1136 928 2 polygon
263 1.00 0 1136 1024 circle
264 1.00 0 1136 928 circle
265 1.000 0.000 0.000 scb
266 (Vinse) {/Helvetica 1.000 cf} 2 23 0 704 1024 pinlabel
267 (Voutp) {/Helvetica 1.000 cf} 2 20 0 1152 1024 pinlabel
268 (Voutm) {/Helvetica 1.000 cf} 2 20 0 1152 928 pinlabel
272 1376 1168 32 0.00 90.00 arc
274 512 1168 32 90.00 180.00 arc
277 512 624 32 180.00 270.00 arc
279 1376 624 32 270.00 360.00 arc
281 (Differential amplifier: test) {/Helvetica 1.000 cf} 2 25 0 944 1232 label
282 pgsave restore showpage
285 % -64 -64 240 128 bbox
287 1 1.00 -44 -28 -44 28 2 polygon
288 1 1.00 -60 0 -64 0 2 polygon
289 1 1.00 0 -64 0 -28 -32 -28 -32 28 0 28 0 64 6 polygon
290 1 1.00 -52 0 8 0.00 360.00 xcarc
291 1.000 0.000 0.000 scb
292 (S) {/Times-Roman 1.000 cf} 2 9 0 0 64 pinlabel
293 (D) {/Times-Roman 1.000 cf} 2 13 0 0 -64 pinlabel
294 (G) {/Times-Roman 1.000 cf} 2 7 0 -64 0 pinlabel
296 (spice:M%i %pD %pG %pS Vdd pmos W=%v"3" L=%v"2") {/Times-Roman 1.000 cf} 2 4 0
299 (sim:p %pG %pS %pD) {/Times-Roman 1.000 cf} 2 4 0 -196 -187 infolabel
300 mark v1 (W=) {/Times-Roman 1.000 cf} ctmk 20 0 16 32 label
301 mark v2 (L=) {/Times-Roman 1.000 cf} ctmk 20 0 16 -32 label
306 % -14 -64 151 128 bbox
307 (1.0) (k) 2 beginparm
308 1 1.00 0 64 0 36 2 polygon
309 1 1.00 0 -64 0 -36 2 polygon
310 1 1.00 0 -36 14 -30 -14 -18 14 -6 -14 6 14 18 -14 30 0 36 8 polygon
311 1.000 0.000 0.000 scb
312 (r.1) {/Times-Roman 1.000 cf} 2 9 0 0 64 pinlabel
313 (r.2) {/Times-Roman 1.000 cf} 2 13 0 0 -64 pinlabel
315 mark v2 v1 (spice:R%i %pr.1 %pr.2 ) {/Times-Roman 1.000 cf} ctmk 4 0 -208 -160 infolabel
316 (sim:R %pr.1 %pr.2) {/Times-Roman 1.000 cf} 2 4 0 -208 -208 infolabel
317 mark (W) {/Symbol 1.000 cf} v2 {hS} v1 {/Times-Roman 1.000 cf} ctmk 20 0 32 0 label
322 % -64 -64 193 128 bbox
324 1 1.00 0 -64 0 -28 -32 -28 -32 28 0 28 0 64 6 polygon
325 1 1.00 -44 -28 -44 28 2 polygon
326 1 1.00 -44 0 -64 0 2 polygon
327 1.000 0.000 0.000 scb
328 (G) {/Times-Roman 1.000 cf} 2 7 0 -64 0 pinlabel
329 (S) {/Times-Roman 1.000 cf} 2 13 0 0 -64 pinlabel
330 (D) {/Times-Roman 1.000 cf} 2 9 0 0 64 pinlabel
332 (spice:M%i %pD %pG %pS GND nmos W=%v"3" L=%v"2") {/Times-Roman 1.000 cf} 2 4 0
335 (sim:n %pG %pS %pD) {/Times-Roman 1.000 cf} 2 4 0 -244 -187 infolabel
336 mark v1 (W=) {/Times-Roman 1.000 cf} ctmk 20 0 16 32 label
337 mark v2 (L=) {/Times-Roman 1.000 cf} ctmk 20 0 16 -32 label
342 % -64 -64 211 128 bbox
344 1 1.00 -44 -28 -44 28 2 polygon
345 1 1.00 -60 0 -64 0 2 polygon
346 1 1.00 0 -64 0 -28 -32 -28 -32 28 0 28 0 64 6 polygon
347 1 1.00 -52 0 8 0.00 360.00 xcarc
348 1.000 0.000 0.000 scb
349 (S) {/Times-Roman 1.000 cf} 2 9 0 0 64 pinlabel
350 (D) {/Times-Roman 1.000 cf} 2 13 0 0 -64 pinlabel
351 (G) {/Times-Roman 1.000 cf} 2 7 0 -64 0 pinlabel
353 (spice:M%i %pD %pG %pS %pB pmos W=%v"3" L=%v"2") {/Times-Roman 1.000 cf} 2 4 0
356 (sim:p %pG %pS %pD) {/Times-Roman 1.000 cf} 2 4 0 -196 -187 infolabel
357 mark v1 (W=) {/Times-Roman 1.000 cf} ctmk 20 0 16 32 label
358 mark v2 (L=) {/Times-Roman 1.000 cf} ctmk 20 0 16 -32 label
359 1 1.00 -32 0 16 0 2 polygon
360 1.000 0.000 0.000 scb
361 (B) {/Times-Roman 1.000 cf} 2 20 0 16 0 pinlabel
369 1 1.00 0 0 0 32 2 polygon
370 1 1.00 -32 32 32 32 2 polygon
371 (Vdd) {/Times-Roman 0.900 cf} 2 17 0 0 38 label
372 1.000 0.000 0.000 scb
373 (Vdd) {/Times-Roman 1.000 cf} 2 13 0 0 0 pinglobal
378 % -584 -380 841 830 bbox
380 1.00 0 128 320 [(525.6) (1.8) ] pMOS
381 1.00 -1 -16 320 [(294) (2.4) ] pMOS
382 1 1.00 64 320 -544 320 2 polygon
385 1.00 0 128 -96 [(387) (1.2) ] nMOS
386 1 1.00 128 -32 128 256 2 polygon
387 1 1.00 48 0 128 0 2 polygon
389 1 1.00 -16 -112 -16 -160 2 polygon
392 1 1.00 64 -96 -448 -96 2 polygon
393 1 1.00 -16 -64 -16 -80 2 polygon
394 1.00 0 -16 -96 jumper
395 1.00 -271 -224 16 [(73.2) (35.2) ] pmos4
396 1 1.00 -224 0 -224 -96 2 polygon
397 1 1.00 -288 16 -288 -96 2 polygon
398 1 1.00 -160 16 -160 -96 2 polygon
399 1 1.00 -224 80 -224 160 -16 160 3 polygon
405 1 1.00 -448 32 -448 -192 2 polygon
406 1.00 -1 -448 96 [(294) (3) ] pmos4
407 1 1.00 -384 96 -352 96 2 polygon
408 1.00 0 -352 96 circle
409 1.00 0 -448 -256 [(21) (3) ] nMOS
411 1 1.00 -464 96 -560 96 2 polygon
412 1 1.00 -448 160 -560 160 2 polygon
413 1 1.00 -16 64 -16 256 2 polygon
414 1.00 -1 -16 0 [(588) (1.2) ] pMOS
419 %%PageOrientation: Landscape
421 % ampl_test is_symbol
423 90 rotate -98 -513 translate
427 1.00 0 2001 1136 [(336) (1.8) ] pMOS
428 1.00 90 2385 1280 [(300) (k) ] Resistor
429 1.00 -1 3121 400 [(21) (3) ] nMOS
430 1.00 0 2897 400 [(21) (3) ] nMOS
431 1 1.00 3185 400 3185 464 3121 464 3121 688 4 polygon
432 1.00 0 2897 752 [(126) (1.2) ] pmos4
433 1 1.00 2897 464 2897 688 2 polygon
434 1.00 -1 3121 752 [(126) (1.2) ] pmos4
435 1 1.00 2913 752 3105 752 2 polygon
436 1 1.00 2897 816 3121 816 2 polygon
438 1 1.00 3009 752 3009 1072 2 polygon
439 1.00 0 3009 1136 [(336) (1.8) ] pMOS
443 1 1.00 2897 464 2817 464 2817 400 3 polygon
444 1 1.00 2833 400 1953 400 2 polygon
446 1 1.00 2001 752 2001 1072 2 polygon
447 1 1.00 2833 752 2801 752 2 polygon
448 1 1.00 3185 752 3217 752 2 polygon
449 1.00 0 3217 752 circle
450 1.00 180 2801 752 circle
452 1 1.00 2945 1136 1937 1136 2 polygon
458 1.00 90 2001 976 jumper
459 1.00 90 2577 1280 [(300) (k) ] Resistor
460 1 1.00 2449 1280 2513 1280 2 polygon
461 1 1.00 2481 1280 2481 1248 2 polygon
462 1 1.00 2321 1280 2289 1280 2289 1248 3 polygon
463 1 1.00 2641 1280 2673 1280 2673 1248 3 polygon
465 1.00 270 2289 1248 circle
466 1.00 270 2481 1248 circle
467 1.00 270 2673 1248 circle
468 1.00 0 2561 656 halfamp
469 1 1.00 1377 976 1169 976 2 polygon
470 1.00 -1 1105 976 [(42) (1.8) ] pMOS
471 1 1.00 1185 976 1185 912 1105 912 3 polygon
474 1 1.00 1105 912 1105 624 2 polygon
475 1.00 -1 929 1136 [(84) (1.8) ] pMOS
476 1 1.00 993 1136 1937 1136 2 polygon
477 1 1.00 1009 1136 1009 1072 929 1072 929 624 4 polygon
481 1.000 0.000 0.000 scb
482 (Vinn) {/Helvetica 1.000 cf} 2 20 0 2225 752 pinlabel
483 (Vinp) {/Helvetica 1.000 cf} 2 23 0 1777 752 pinlabel
485 1 1.00 2689 848 2737 848 2 polygon
486 1.00 0 2737 848 circle
488 1.000 0.000 0.000 scb
489 (Voutn) {/Helvetica 1.000 cf} 2 20 0 2753 848 pinlabel
491 1 1.00 1313 848 1265 848 2 polygon
492 1.00 -1 1265 848 circle
493 1.000 0.000 0.000 scb
494 (Voutp) {/Helvetica 1.000 cf} 2 23 0 1249 848 pinlabel
500 1.000 0.000 0.000 scb
501 (Voutp) {/Helvetica 1.000 cf} 2 29 0 2289 1232 pinlabel
502 (Voutn) {/Helvetica 1.000 cf} 2 29 0 2673 1232 pinlabel
503 (Vcmin) {/Helvetica 1.000 cf} 2 29 0 2481 1232 pinlabel
504 (Vcmin) {/Helvetica 1.000 cf} 2 29 0 2785 752 pinlabel
505 (Vcmref) {/Helvetica 1.000 cf} 2 20 0 3233 752 pinlabel
507 1.00 -1 1441 656 halfamp
508 1.00 0 1105 560 [(21) (16.5) ] nMOS
509 1.00 0 929 560 [(21) (16.5) ] nMOS
510 1 1.00 1041 560 817 560 2 polygon
511 1.00 -1 817 560 circle
512 1.000 0.000 0.000 scb
513 (Vbias) {/Helvetica 1.000 cf} 2 23 0 801 560 pinlabel
514 pgsave restore showpage