analog1.ps 8.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242
  1. %%BeginProlog
  2. %
  3. % PostScript prolog for output from xcircuit
  4. % Version: 2.0
  5. %
  6. % Electrical circuit (and otherwise general) drawing program
  7. %
  8. % Written by Tim Edwards 8/5/93--2/25/99 (tim@bach.ece.jhu.edu)
  9. % The Johns Hopkins University
  10. %
  11. %%BeginResource: procset XCIRCproc 2.0 2
  12. % supporting definitions --- these are the primary xcircuit types.
  13. /XCIRCsave save def
  14. /topmat matrix currentmatrix def
  15. /fontslant { /slant exch def [1 0 slant 1 0 0]
  16. exch findfont exch makefont dup length dict /ndict exch def
  17. { 1 index /FID ne { ndict 3 1 roll put } { pop pop } ifelse } forall
  18. ndict definefont pop} def
  19. /cf { dup type /realtype eq {40 mul /fscale exch def} if dup /xfont exch def
  20. findfont fscale scalefont setfont } def
  21. /Ss { gsave 0.67 dup scale gsave mty neg rmoveto
  22. glevel 1 add /glevel exch def } def
  23. /ss { gsave 0.67 dup scale gsave mty 0.5 mul rmoveto
  24. glevel 1 add /glevel exch def } def
  25. /ns { currentpoint transform % preserve x position!
  26. glevel {grestore} repeat /glevel 0 def
  27. itransform pop currentpoint pop sub 0 rmoveto } def
  28. /ul { showflag 1 eq { gsave
  29. currentpoint topmat setmatrix 0 0 moveto 2 index stringwidth pop (_)
  30. false charpath flattenpath pathbbox grestore exch pop 1 index
  31. sub setlinewidth exch pop currentpoint 3 -1 roll add moveto 0
  32. rlineto stroke moveto } if } def
  33. /ol { showflag 1 eq { gsave gsave
  34. currentpoint topmat setmatrix 2 index stringwidth pop 3 index
  35. true charpath flattenpath pathbbox grestore exch pop
  36. exch pop topmat setmatrix (_) true charpath pathbbox grestore
  37. exch pop 1 index sub setlinewidth exch pop currentpoint
  38. exch 4 1 roll exch sub add moveto pop 0 rlineto stroke
  39. moveto } if } def
  40. /stW { gsave true charpath flattenpath pathbbox pop exch pop sub
  41. grestore } def
  42. /bs { stW 0 rmoveto } def
  43. /pspc 0 def
  44. /qS { (aa) stW (a a) stW sub 4 div 0 rmoveto } def
  45. /hS { qS qS } def
  46. /textx { dup 1 add copy 0 exch { exch dup type /stringtype eq
  47. {stringwidth pop add}{exec} ifelse } repeat neg ns } def
  48. /mty { 0 topmat setmatrix (A) true charpath flattenpath pathbbox exch
  49. pop exch sub exch pop neg grestore } def
  50. /texty { gsave 2 copy pop exec mty } def
  51. /tcenter { textx grestore 0.5 mul 0 rmoveto } def
  52. /tright { textx grestore fspc sub 0 rmoveto } def
  53. /tmiddle { texty 0.5 mul rmoveto } def
  54. /ttop { texty fspc sub rmoveto } def
  55. /tshow {{ dup type /stringtype eq {show}{exec} ifelse} repeat ns } def
  56. /label { gsave translate 0 0 moveto rotate /just exch def just 16 and 0 gt
  57. {0 1 dtransform gsave pagemat setmatrix idtransform exch grestore
  58. 1 0 dtransform gsave pagemat setmatrix idtransform exch grestore
  59. dup 0 eq {pop mul 0 gt} {3 1 roll pop pop 0 lt} ifelse
  60. {-1 /just just dup 3 and 1 ne {3 xor} if def} {1} ifelse exch 0 lt
  61. {-1 /just just dup 12 and 4 ne {12 xor} if def} {1} ifelse scale } if
  62. /glevel 0 def /showflag 0 def /fspc pspc def
  63. just 1 and 0 gt {gsave just 2 and 0 gt {tright}{tcenter} ifelse}
  64. {fspc 0 rmoveto} ifelse
  65. just 4 and 0 gt {just 8 and 0 gt {ttop}{tmiddle} ifelse}
  66. {0 fspc rmoveto} ifelse
  67. /showflag 1 def tshow grestore } def
  68. /pinlabel { hlevel 0 eq { /pspc 20 def label /pspc 0 def }
  69. { pop pop pop pop {pop} repeat } ifelse } def
  70. /pinglobal { pinlabel } def
  71. /infolabel { pinlabel } def
  72. /begingate { /hlevel hlevel 1 add def gsave translate 0 0 moveto dup 0 lt
  73. {neg 1 sub -1 1 scale} if rotate dup scale } bind def
  74. /makeparm {3 string cvs dup length 1 add string /tstr exch def tstr exch
  75. 1 exch putinterval tstr 0 (v) putinterval tstr cvn} bind def
  76. /beginparm { -1 1 {makeparm exch def} for
  77. dup type /arraytype eq { aload length -1 1 {makeparm exch def}
  78. for } if begingate } bind def
  79. /endgate { /hlevel hlevel 1 sub def grestore } bind def
  80. /hlevel 0 def
  81. /tmpa [1 0 0 1 0 0] def
  82. /gar {8 8 true tmpa {<c0 c0 00 00 0c 0c 00 00>} imagemask} bind
  83. {8 8 true tmpa {<30 70 60 02 03 07 06 20>} imagemask} bind
  84. {8 8 true tmpa {<0c 1e 1e 0c c0 e1 e1 c0>} imagemask} bind
  85. {8 8 true tmpa {<0f 0f 0f 0f f0 f0 f0 f0>} imagemask} bind
  86. {8 8 true tmpa {<3f f3 e1 e1 f3 3f 1e 1e>} imagemask} bind
  87. {8 8 true tmpa {<df cf 8f 9f fd fc f8 f9>} imagemask} bind
  88. {8 8 true tmpa {<ff 3f 3f ff ff f3 f3 ff>} imagemask} bind 7 array astore def
  89. /ppaint { gsave clip tmpa dup setmatrix pathbbox neg exch neg 4 2 roll
  90. neg 4 -1 roll 2 copy gt {exch} if 8 div ceiling 8 mul 4 2 roll neg 2 copy
  91. gt {exch} if 8 div ceiling 8 mul 3 -1 roll -8 5 -1 roll
  92. { 3 index exch 5 exch put dup -8 3 index { 3 index
  93. exch 4 exch put 3 index exec } for } for pop pop pop pop grestore } bind def
  94. /setstyles {
  95. currentlinewidth mul setlinewidth /style exch def
  96. style 1 and 0 gt not {closepath} if
  97. style 2 and 0 gt {currentlinewidth 4 mul dup 2 array astore 0 setdash} if
  98. style 4 and 0 gt {0.5 currentlinewidth 4 mul 2 array astore 0 setdash} if
  99. style dup 256 ge exch 480 lt and { gsave 1 setgray eofill grestore } if
  100. style 16 and 0 gt { gsave style 224 and -5 bitshift dup 7 lt
  101. {gar exch get ppaint} { pop eofill } ifelse grestore } if
  102. style 8 and 0 gt { newpath } { stroke } ifelse grestore } def
  103. /scb { gsave setrgbcolor } bind def /sce { grestore } bind def
  104. /polygon { gsave /num exch def moveto num 1 sub {lineto} repeat setstyles } def
  105. /xcarc { gsave newpath arc setstyles } def
  106. /elb { matrix currentmatrix 7 -1 roll 7 -1 roll translate 5 1 roll 4 -1 roll
  107. 3 index div 1 scale } def
  108. /ele { 0 4 1 roll 0 4 1 roll } bind def
  109. /ellipse { gsave elb newpath ele arc setmatrix setstyles } def
  110. /pellip { elb ele arc setmatrix } def
  111. /nellip { elb ele arcn setmatrix } def
  112. /spline { gsave moveto curveto setstyles } def
  113. /polyc { {lineto} repeat } bind def
  114. /beginpath { gsave moveto } bind def
  115. /endpath { setstyles } bind def
  116. /bop { 1 setlinecap 0 setlinejoin 6 setmiterlimit 0 setgray } def
  117. /setpagemat {/pagemat matrix currentmatrix def} def
  118. /inchscale {setpagemat 0.375 mul dup scale} def
  119. /cmscale {setpagemat 0.35433071 mul dup scale} def
  120. %%EndResource
  121. %%EndProlog
  122. % XCircuit output starts here.
  123. /resistor {
  124. % -14 -64 66 128 bbox
  125. (10) (k) 2 beginparm
  126. % fundamental
  127. 1 1.00 0 64 0 36 2 polygon
  128. 1 1.00 0 -64 0 -36 2 polygon
  129. 1 1.00 0 -36 14 -30 -14 -18 14 -6 -14 6 14 18 -14 30 0 36 8 polygon
  130. 1.000 0.000 0.000 scb
  131. (r.1) {/Times-Roman 1.000 cf} 2 9 0 0 64 pinlabel
  132. (r.2) {/Times-Roman 1.000 cf} 2 13 0 0 -64 pinlabel
  133. sce
  134. (spice:R%i %pr.1 %pr.2 %v"10"%v"k") {/Times-Roman 1.000 cf} 2 0 0 -208 -160 infolabel
  135. (sim:r %pr.1 %pr.2) {/Times-Roman 1.000 cf} 2 0 0 -208 -208 infolabel
  136. (W) {/Symbol 1.000 cf} () v2 () {hS} () v1 () {/Helvetica 1.000 cf} 10 29 90 24 0 label
  137. endgate
  138. } def
  139. /nmos {
  140. % -64 -64 64 128 bbox
  141. (1.0) (1.0) 2 beginparm
  142. % fundamental
  143. 1 1.00 0 -64 0 -28 -32 -28 -32 28 0 28 0 64 6 polygon
  144. 1 1.00 -44 -28 -44 28 2 polygon
  145. 1 1.00 -44 0 -64 0 2 polygon
  146. 1.000 0.000 0.000 scb
  147. (G) {/Helvetica 1.000 cf} 2 7 0 -64 0 pinlabel
  148. (S) {/Helvetica 1.000 cf} 2 13 0 0 -64 pinlabel
  149. (D) {/Helvetica 1.000 cf} 2 9 0 0 64 pinlabel
  150. sce
  151. (u) v2 (u L=) v1 (spice:M%i %pD %pG %pS GND nmos W=) {/Times-Roman 1.000 cf} 6 4 0 -244 -139 infolabel
  152. (sim:n %pG %pS %pD) {/Times-Roman 1.000 cf} 2 4 0 -244 -187 infolabel
  153. endgate
  154. } def
  155. /dot {
  156. % -10 -10 20 20 bbox
  157. begingate
  158. 248 1.00 0 0 6 0.00 360.00 xcarc
  159. endgate
  160. } def
  161. /gnd {
  162. % -32 -60 64 68 bbox
  163. begingate
  164. 1 1.00 0 0 0 -32 2 polygon
  165. 1 1.00 -32 -32 32 -32 2 polygon
  166. 1 1.00 -18 -46 18 -46 2 polygon
  167. 1 1.00 -4 -60 4 -60 2 polygon
  168. 1.000 0.000 0.000 scb
  169. (GND) {/Times-Roman 1.000 cf} 2 1 0 0 0 pinglobal
  170. sce
  171. endgate
  172. } def
  173. /vdd {
  174. % -32 0 64 66 bbox
  175. begingate
  176. 1 1.00 0 0 0 32 2 polygon
  177. 1 1.00 -32 32 32 32 2 polygon
  178. (Vdd) {/Times-Roman 0.900 cf} 2 17 0 0 38 label
  179. 1.000 0.000 0.000 scb
  180. (Vdd) {/Times-Roman 1.000 cf} 2 13 0 0 0 pinglobal
  181. sce
  182. endgate
  183. } def
  184. /circle {
  185. % -6 -12 28 24 bbox
  186. begingate
  187. 1 1.00 16 0 6 0.00 360.00 xcarc
  188. 1 1.00 0 0 10 0 2 polygon
  189. 1.000 0.000 0.000 scb
  190. (out) {/Times-Roman 1.000 cf} 2 4 0 16 0 pinlabel
  191. (out) {/Times-Roman 1.000 cf} 2 7 0 0 0 pinlabel
  192. sce
  193. endgate
  194. } def
  195. %%Page: analog1 1
  196. %%PageOrientation: Portrait
  197. /pgsave save def bop
  198. % 448 284 offsets
  199. 1.0000 inchscale
  200. 2.6000 setlinewidth
  201. 1.00 0 224 540 [(100) () ] resistor
  202. 1.00 0 448 540 [(20) (k) ] resistor
  203. 1.00 0 448 316 [(4.0) (2.0) ] nmos
  204. 1.00 -1 224 316 [(10) (2.0) ] nmos
  205. 1 1.00 224 476 224 380 2 polygon
  206. 1 1.00 448 476 448 380 2 polygon
  207. 1 1.00 384 316 288 316 2 polygon
  208. 1 1.00 336 316 336 412 224 412 3 polygon
  209. 1.00 0 224 412 dot
  210. 1.00 0 336 316 dot
  211. 1.00 0 224 252 gnd
  212. 1.00 0 448 252 gnd
  213. 1.00 0 224 604 vdd
  214. 1.00 0 448 604 vdd
  215. 1 1.00 448 412 544 412 2 polygon
  216. 1.00 0 448 412 dot
  217. 1.00 0 544 412 circle
  218. 1.000 0.000 0.000 scb
  219. (Vout) {/Times-Roman 1.000 cf} 2 20 0 560 412 pinlabel
  220. sce
  221. pgsave restore showpage
  222. %%Trailer
  223. XCIRCsave restore
  224. %%EOF