2 %%Title: examples/logic8
3 %%Creator: Xcircuit v3.1
4 %%CreationDate: Tue Apr 29 14:39:02 2003
6 %%BoundingBox: 110 290 502 502
7 %%DocumentNeededResources: font Times-Roman
11 % PostScript prolog for output from xcircuit
14 % Electrical circuit (and otherwise general) drawing program
16 % Written by Tim Edwards 8/5/93--1/15/03 (tim@bach.ece.jhu.edu)
17 % The Johns Hopkins University
19 %%BeginResource: procset XCIRCproc 2.4 2
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 /Ts {mark Tabs aload pop counttomark 1 add array astore /Tabs exch def Tabs
44 0 currentpoint pop put} def
45 /Tbn {mark Tabs aload pop counttomark dup 2 add 1 roll cleartomark 1 sub} def
46 /Tb { 0 1 Tbn {Tabs exch get dup currentpoint pop lt
47 {currentpoint exch pop moveto exit} {pop} ifelse } for } def
48 /Tf { Tbn -1 0 {Tabs exch get dup currentpoint pop gt
49 {currentpoint exch pop moveto exit} {pop} ifelse } for } def
50 /qS { (aa) stW (a a) stW sub 4 div 0 Kn } def
53 /cf0 { scalefont setfont } bind def
54 /Kn { dup kY add /kY exch def rmoveto } bind def
55 /ss { /fscale fscale 0.67 mul def currentfont 0.67 cf0 0 fscale0 fscale mul
57 /Ss { /fscale fscale 0.67 mul def currentfont 0.67 cf0 0 fscale0 fscale mul
59 /ns { 0 kY neg Kn /kY 0 def /fscale 1.0 def xfont0 1.0 cf0 } def
60 /CR { ns 0 /Bline Bline fscale0 neg add def Bline moveto } def
61 /cf { dup type /realtype ne {1.0} if exch findfont exch kY 0 eq
62 { 40 mul dup /fscale0 exch def cf0 /xfont0 currentfont def}
63 {fscale0 mul fscale mul cf0} ifelse } def
64 /ctmk { counttomark dup 2 add -1 roll pop } bind def
65 /label { gsave translate 0 0 moveto dup scale neg /rotval exch def
66 /just exch def just 16 and 0 gt {gsave rotval rotate 0 1 dtransform
67 gsave pagemat setmatrix idtransform exch grestore 1 0 dtransform
68 gsave pagemat setmatrix idtransform exch grestore dup abs 1e-9 lt
69 {pop mul 0 gt} {3 1 roll pop pop 0 lt} ifelse grestore {-1 /rotval
70 rotval neg def /just just dup 3 and 1 ne {3 xor} if def} {1} ifelse
71 exch -1e-9 lt {-1 /rotval rotval neg def /just just dup 12 and
72 4 ne {12 xor} if def} {1} ifelse scale } if /showflag 0 def
73 /fspc pspc def /Bline 0 def /Tabs 0 array def /fscale 1.0 def
74 /kY 0 def gsave dup 1 add copy 0 exch 1 0 dtransform exch atan rotate
75 {exch dup type /stringtype eq {true charpath flattenpath} {exec}
76 ifelse } repeat pop pathbbox grestore 3 -1 roll pop 3 1 roll just
77 1 and 0 gt {just 2 and 0 gt {exch pop neg fspc sub} {exch sub 0.5
78 mul neg} ifelse} {pop neg fspc add} ifelse exch Bline exch just 4
79 and 0 gt {just 8 and 0 gt {exch pop neg fspc sub} {add 0.5 mul neg}
80 ifelse} {pop neg fspc add} ifelse rotval rotate Kn currentpoint
81 translate /showflag 1 def /Bline 0 def /Tabs 0 array def /fscale
82 1.0 def /kY 0 def {dup type /stringtype eq {show}{exec} ifelse}
84 /pinlabel { 4 index 32 and 0 ne hlevel 0 eq or { /pspc 10 def label
85 /pspc 0 def } { pop pop pop pop pop {pop} repeat } ifelse } def
86 /pinglobal { pinlabel } def
87 /infolabel { pinlabel } def
89 /scb { setrgbcolor } bind def /sce { defColor aload pop scb } bind def
90 /cRedef {/defColor currentcolor 3 array astore def} def
91 /begingate { /hlevel hlevel 1 add def /defColor currentcolor sce 3 array
92 astore def gsave sce translate 0 0 moveto neg rotate dup abs scale
94 /makeparm {3 string cvs dup length 1 add string /tstr exch def tstr exch
95 1 exch putinterval tstr 0 (v) putinterval tstr cvn} bind def
96 /beginparm { -1 1 {makeparm exch def} for
97 dup type /arraytype eq { aload length -1 1 {makeparm exch def}
98 for } if begingate } bind def
99 /endgate { /hlevel hlevel 1 sub def grestore defColor aload pop cRedef
103 /tmpa [1 0 0 1 0 0] def
104 /gar {8 8 true tmpa {<c0 c0 00 00 0c 0c 00 00>} imagemask} bind
105 {8 8 true tmpa {<30 70 60 02 03 07 06 20>} imagemask} bind
106 {8 8 true tmpa {<0c 1e 1e 0c c0 e1 e1 c0>} imagemask} bind
107 {8 8 true tmpa {<0f 0f 0f 0f f0 f0 f0 f0>} imagemask} bind
108 {8 8 true tmpa {<3f f3 e1 e1 f3 3f 1e 1e>} imagemask} bind
109 {8 8 true tmpa {<df cf 8f 9f fd fc f8 f9>} imagemask} bind
110 {8 8 true tmpa {<ff 3f 3f ff ff f3 f3 ff>} imagemask} bind 7 array astore def
111 /ppaint { gsave clip tmpa dup setmatrix pathbbox neg exch neg 4 2 roll
112 neg 4 -1 roll 2 copy gt {exch} if 8 div ceiling 8 mul 4 2 roll neg 2 copy
113 gt {exch} if 8 div ceiling 8 mul 3 -1 roll -8 5 -1 roll
114 { 3 index exch 5 exch put dup -8 3 index { 3 index
115 exch 4 exch put 3 index exec } for } for pop pop pop pop grestore } bind def
117 currentlinewidth mul setlinewidth /style exch def
118 style 1 and 0 gt not {closepath} if
119 style 2 and 0 gt {currentlinewidth 4 mul dup 2 array astore 0 setdash} if
120 style 4 and 0 gt {0.5 currentlinewidth 4 mul 2 array astore 0 setdash} if
121 gsave style 16 and 0 gt { style 224 and -5 bitshift style 256 and 0 gt {
122 7 exch sub 8 div dup 1 exch sub currentrgbcolor 3 array astore
123 {3 copy mul add 4 1 roll pop} forall pop pop setrgbcolor eofill}
124 {dup 7 lt {gar exch get ppaint} {pop eofill} ifelse} ifelse}
125 {style 256 and 0 gt {1 setgray eofill} if} ifelse grestore style 8 and 0 gt
126 style 512 eq or {newpath} {stroke} ifelse grestore} def
128 /polygon { gsave /num exch def moveto num 1 sub {lineto} repeat setstyles } def
129 /xcarc { gsave newpath arc setstyles } def
130 /elb { matrix currentmatrix 7 -1 roll 7 -1 roll translate 5 1 roll 4 -1 roll
131 3 index div 1 scale } def
132 /ele { 0 4 1 roll 0 4 1 roll } bind def
133 /ellipse { gsave elb newpath ele arc setmatrix setstyles } def
134 /pellip { elb ele arc setmatrix } def
135 /nellip { elb ele arcn setmatrix } def
136 /spline { gsave moveto curveto setstyles } def
137 /polyc { {lineto} repeat } bind def
138 /beginpath { gsave moveto } bind def
139 /endpath { setstyles } bind def
140 /bop { 1 setlinecap 0 setlinejoin 6 setmiterlimit 0 0 0 scb cRedef } def
141 /psinsertion {/PSobj save def /showpage {} def bop rotate translate dup scale} def
142 /end_insert {PSobj restore} def
143 /setpagemat {/pagemat matrix currentmatrix def} def
144 /inchscale {setpagemat 0.375 mul dup scale} def
145 /cmscale {setpagemat 0.35433071 mul dup scale} def
150 % XCircuit output starts here.
155 1 1.00 0 -48 -64 -48 -64 48 0 48 4 polygon
156 1 1.00 56 0 8 0.00 360.00 xcarc
157 1 1.00 0 0 48 -90.00 90.00 xcarc
158 1.000 0.000 0.000 scb
159 (Out) {/Times-Roman cf} 2 4 0 1.00 64 0 pinlabel
160 (In.1) {/Times-Roman cf} 2 7 0 1.00 -64 32 pinlabel
161 (In.2) {/Times-Roman cf} 2 7 0 1.00 -64 -32 pinlabel
166 % invert is_schematic
168 0 1.00 -32 -40 -32 40 40 0 3 polygon
169 1 1.00 48 0 8 0.00 360.00 xcarc
170 1 1.00 -32 0 -48 0 2 polygon
171 1 1.00 56 0 64 0 2 polygon
172 1.000 0.000 0.000 scb
173 (Out) {/Times-Roman cf} 2 4 0 1.00 64 0 pinlabel
174 (In) {/Times-Roman cf} 2 7 0 1.00 -48 0 pinlabel
181 248 1.00 0 0 6 0.00 360.00 xcarc
182 1.000 0.000 0.000 scb
183 (x) {/Times-Roman cf} 2 29 0 1.00 0 0 pinlabel
190 1 1.00 16 0 6 0.00 360.00 xcarc
191 1 1.00 0 0 10 0 2 polygon
192 1.000 0.000 0.000 scb
193 (out) {/Times-Roman cf} 2 4 0 1.00 16 0 pinlabel
194 (out) {/Times-Roman cf} 2 7 0 1.00 0 0 pinlabel
199 %%PageOrientation: Portrait
207 1.00 0 656 1120 invert
208 1 1.00 720 1120 880 1120 2 polygon
209 1 1.00 608 1120 560 1120 2 polygon
210 1 1.00 880 1056 784 1056 784 960 880 960 4 polygon
211 1 1.00 880 896 560 896 2 polygon
212 1 1.00 784 960 560 960 2 polygon
214 1 1.00 1008 1088 1136 1088 2 polygon
215 1 1.00 1008 928 1136 928 2 polygon
216 -1.00 0 560 1120 circle
217 1.00 0 1136 1088 circle
218 1.00 0 1136 928 circle
219 -1.00 0 560 896 circle
220 -1.00 0 560 960 circle
221 (Logic Circuit) {/Times-Roman cf} 2 9 0 1.00 816 1280 label
222 0 1.00 304 784 304 1328 1328 1328 1328 784 4 polygon
223 1.000 0.000 0.000 scb
224 (Pin.1) {/Times-Roman cf} 2 7 0 1.00 544 1120 pinlabel
225 (Pin.2) {/Times-Roman cf} 2 7 0 1.00 544 960 pinlabel
226 (Pin.3) {/Times-Roman cf} 2 7 0 1.00 544 896 pinlabel
227 (Pin.5) {/Times-Roman cf} 2 4 0 1.00 1152 928 pinlabel
228 (Pin.4) {/Times-Roman cf} 2 4 0 1.00 1152 1088 pinlabel
229 pgsave restore showpage
233 1 1.00 0 0 0 -32 2 polygon
234 1 1.00 -32 -32 32 -32 2 polygon
235 1 1.00 -18 -46 18 -46 2 polygon
236 1 1.00 -4 -60 4 -60 2 polygon
237 1.000 0.000 0.000 scb
238 (GND) {/Times-Roman cf} 2 1 0 1.00 0 0 pinglobal
244 1 1.00 -44 -28 -44 28 2 polygon
245 1 1.00 -60 0 -64 0 2 polygon
246 1 1.00 0 -64 0 -28 -32 -28 -32 28 0 28 0 64 6 polygon
247 1 1.00 -52 0 8 0.00 360.00 xcarc
248 1.000 0.000 0.000 scb
249 (S) {/Times-Roman cf} 2 9 0 1.00 0 64 pinlabel
250 (D) {/Times-Roman cf} 2 13 0 1.00 0 -64 pinlabel
251 (G) {/Times-Roman cf} 2 7 0 1.00 -64 0 pinlabel
252 0.180 0.545 0.341 scb
253 (spice:M%i %pD %pG %pS Vdd pmos) {/Times-Roman cf} 2 4 0 1.00 -196 -139
255 (sim:p %pG %pS %pD) {/Times-Roman cf} 2 4 0 1.00 -196 -187 infolabel
261 1 1.00 0 -64 0 -28 -32 -28 -32 28 0 28 0 64 6 polygon
262 1 1.00 -44 -28 -44 28 2 polygon
263 1 1.00 -44 0 -64 0 2 polygon
264 1.000 0.000 0.000 scb
265 (G) {/Times-Roman cf} 2 7 0 1.00 -64 0 pinlabel
266 (S) {/Times-Roman cf} 2 13 0 1.00 0 -64 pinlabel
267 (D) {/Times-Roman cf} 2 9 0 1.00 0 64 pinlabel
268 0.180 0.545 0.341 scb
269 (spice:M%i %pD %pG %pS GND nmos) {/Times-Roman cf} 2 4 0 1.00 -244 -139
271 (sim:n %pG %pS %pD) {/Times-Roman cf} 2 4 0 1.00 -244 -187 infolabel
278 1 1.00 0 0 10 -90.00 90.00 xcarc
279 1 1.00 0 10 0 16 2 polygon
280 1 1.00 0 -10 0 -16 2 polygon
281 1.000 0.000 0.000 scb
282 (a) {/Times-Roman cf} 2 1 0 1.00 0 16 pinlabel
283 (a) {/Times-Roman cf} 2 13 0 1.00 0 -16 pinlabel
289 1 1.00 0 0 0 32 2 polygon
290 1 1.00 -32 32 32 32 2 polygon
291 (Vdd) {/Times-Roman cf} 2 17 0 0.90 0 38 label
292 1.000 0.000 0.000 scb
293 (Vdd) {/Times-Roman cf} 2 13 0 1.00 0 0 pinglobal
298 %%PageOrientation: Portrait
306 -1.00 0 872 1248 pmos
310 1 1.00 744 1184 872 1184 2 polygon
311 1 1.00 744 1312 872 1312 2 polygon
312 1 1.00 968 1168 968 992 872 992 3 polygon
313 1 1.00 872 1184 1016 1184 2 polygon
314 1 1.00 744 1120 648 1120 648 1248 680 1248 4 polygon
315 1 1.00 616 1120 648 1120 2 polygon
316 1 1.00 936 1248 1016 1248 2 polygon
322 -1.00 0 616 1120 circle
323 1.00 0 1016 1248 circle
324 1.00 0 1016 1184 circle
325 1 1.00 968 1200 968 1248 2 polygon
326 1.00 0 968 1184 jumper
327 (2-Input Nand gate) {/Times-Roman cf} 2 9 0 1.00 808 1440 label
329 1 1.00 904 752 936 752 2 polygon
330 1 1.00 776 784 744 784 2 polygon
331 1 1.00 776 720 744 720 2 polygon
332 -1.00 0 744 720 circle
333 1.00 0 936 752 circle
334 -1.00 0 744 784 circle
335 ( Out) {/Times-Roman cf} 2 4 0 1.00 952 752 label
336 (In.1 ) {/Times-Roman cf} 2 7 0 1.00 728 784 label
337 (In.2 ) {/Times-Roman cf} 2 7 0 1.00 728 720 label
338 (\(symbol\)) {/Times-Roman cf} 2 5 0 1.00 824 656 label
339 1 1.00 312 832 1320 832 2 polygon
340 0 1.00 312 608 312 1504 1320 1504 1320 608 4 polygon
341 1.000 0.000 0.000 scb
342 (In.1) {/Times-Roman cf} 2 7 0 1.00 600 1120 pinlabel
343 (Out) {/Times-Roman cf} 2 4 0 1.00 1032 1184 pinlabel
344 (In.2) {/Times-Roman cf} 2 4 0 1.00 1032 1248 pinlabel
347 pgsave restore showpage
350 %%PageOrientation: Portrait
360 1 1.00 768 1208 768 1208 736 1208 736 1080 768 1080 5 polygon
361 1 1.00 832 1144 928 1144 2 polygon
362 1 1.00 736 1144 672 1144 2 polygon
365 -1.00 0 672 1144 circle
366 1.00 0 928 1144 circle
367 (Inverter) {/Times-Roman cf} 2 9 0 1.00 832 1400 label
368 1 1.00 864 792 896 792 2 polygon
369 1 1.00 752 792 720 792 2 polygon
370 1.00 0 896 792 circle
371 -1.00 0 720 792 circle
372 ( Out) {/Times-Roman cf} 2 4 0 1.00 912 792 label
373 (In ) {/Times-Roman cf} 2 7 0 1.00 704 792 label
374 (\(symbol\)) {/Times-Roman cf} 2 5 0 1.00 816 696 label
375 1 1.00 512 888 1120 888 2 polygon
376 0 1.00 512 648 512 1464 1120 1464 1120 648 4 polygon
377 1.00 0 800 792 invert
378 1.000 0.000 0.000 scb
379 (Out) {/Times-Roman cf} 2 4 0 1.00 944 1144 pinlabel
380 (In) {/Times-Roman cf} 2 7 0 1.00 656 1144 pinlabel
383 pgsave restore showpage